My colleague mentioned that there are some major improvements in CLR 4.0 related to Event Tracing for Windows but I couldn't find details of what exactly is new. There are few blog posts that mention only about improvements but do not provide any details on what exactly is new. Anyone has more insight into it?
Here is a list of ETW events in CLR 4.0
- Runtime Information ETW Events
- Exception Thrown_V1 ETW Event
- Contention ETW Events
- Thread Pool ETW Events
- Loader ETW Events
- Method ETW Events
- Garbage Collection ETW Events
- JIT Tracing ETW Events
- Interop ETW Events Application
- Domain Resource Monitoring (ARM) ETW Events
- Security ETW Events
- Stack ETW Event
For detailed explanation on these you can read them up in msdn
And also XPERF cannot decode managed stacks with ETW, so BCL team has released another tool in codeplex called Perfmonitor which can be used.
HTH
- Application domain resource monitoring is available through the managed and native hosting APIs and event tracing for Windows (ETW).
- You can now access the ETW events for diagnostic purposes to improve performance.
http://msdn.microsoft.com/en-us/library/ms171868.aspx#core_new_features_and_improvements
Two improvements that you could probably find if you dug around in some of the links above are a new EventProviderTraceListener class and a new EventProvider class.
The EventProviderTraceListener can listen to TraceSources (like any other TraceListener) and route the TraceSource messages into the ETW system.
The EventProvider class allows you to log messages directly to the ETW system.
These classes are only available on Vista and higher (actually, they are "available" in the .NET framework 4.0 on whatever level of OS you are using, but they don't work on XP and lower).
I have not used either of these classes (nor have I used ETW), but it looks to me like they make it a lot easier to use ETW from .NET applications. If you want to use ETW you still have some work ahead of you to get ETW itself configured.
Here is an article that describes how to use ETW. I am not sure if there is more current information about ETW or not. Note that this article was written before the new .NET ETW classes became available.
© 2022 - 2024 — McMap. All rights reserved.