Question

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?

Was it helpful?

Solution

Here is a list of ETW events in CLR 4.0

  1. Runtime Information ETW Events
  2. Exception Thrown_V1 ETW Event
  3. Contention ETW Events
  4. Thread Pool ETW Events
  5. Loader ETW Events
  6. Method ETW Events
  7. Garbage Collection ETW Events
  8. JIT Tracing ETW Events
  9. Interop ETW Events Application
  10. Domain Resource Monitoring (ARM) ETW Events
  11. Security ETW Events
  12. 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

OTHER TIPS

  • 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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top