none
ETW private session without logfile RRS feed

  • Question

  • I’m trying to write a profiler, which consumes CLR ETW events in-process. Therefore I’ve found that ETW private sessions seem to be a good choice (no admin-privileges needed, no 64 session limit). According to https://msdn.microsoft.com/en-us/library/windows/desktop/aa364080%28v=vs.85%29.aspx EVENT_TRACE_REAL_TIME_MODE is not allowed for private sessions, so it seems it’s only possible to use the file-logging mode.  Is it possible to avoid this and use an in-memory buffer (real-time mode) for private ETW sessions?

     

    Or is ETW the wrong way at all to consume CLR Metrics in-process? In fact I’m just trying to periodically gather statistics about some CLR internals (such as GC, JIT, ect).

     

    Thanks in advance.



    • Edited by MSRules Wednesday, March 23, 2016 7:43 AM
    Tuesday, March 22, 2016 10:20 AM

All replies

  • Hi MSRules

    >>I’m trying to write a profiler, which consumes CLR ETW events in-process.

    From my personal of view, it is hard to make a profiler by yourself. There are some readily available tools like CLR Profiler or Perfview.

    ETW Tracing
    http://msdn.microsoft.com/en-us/library/ms751538.aspx

    How To: Use CLR Profilerhttps://blogs.msdn.microsoft.com/dotnet/2012/10/09/improving-your-apps-performance-with-perfview/

    Best regards,

    Kirstin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 23, 2016 6:13 AM
  • Hi Kirstin. Thanks, but I really want to go the "hard way" :). I already have a native profiler (which uses CLR Profiling API) in place. It uses performance counters to query CLR metrics (GC, JIT, ect) so far. But perfcounter api has it's quirks. Also, perfcounters are not available for CoreCLR at all. That's why I am researching an alternative way to get those metrics, and I thought ETW is "the way to go".
    Wednesday, March 23, 2016 7:44 AM
  • Hi,

    Sorry for my late reply.

    I am not CLR ETW events in-process expert. Here I found some documents, please take a look, hope you'll get some hints from the following .

    Capturing a profile in production based on ETW events

    CLR ETW Keywords and Levels

    You can find more advanced articles by searching MSDN for CLR Profiling. 

    CLR Documentation for the latest profiling API:
    http://msdn2.microsoft.com/en-us/library/ms404386.aspx

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 28, 2016 9:32 AM