开发者

C++ Event Tracing for Windows (ETW) wrapper [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

开发者_JS百科Closed 3 years ago.

Improve this question

I have been investigating Event Tracing for Windows (ETW) for use within existing backend/server applications. MSDN and other sources have sold the power of the framework and its integration with xperf, etc. which frankly I am impressed with.

However I am a bit concerned by the Win32 APIs and the overhead of working with the manifest coding compilating/registration, etc.

Folks, do you:

  • Recommend it? Have problems using it with your systems?
  • Know of a more C++/STL style wrapper?
  • Are there tools for managing the manifest files?


Rather than using the Win32 API directly, I would recommend using WPP.

WPP is a pre-processor which allow you to write printf-like trace lines anywhere in your code and have the result of those, along with the additional data (e.g. the arguments passed to the various %d and %s in the trace) be logged to ETW.

The definite guide for this is WPP Tracing in Visual C++ 2010 Projects.


On the one hand, ETW is very powerful. But at the same time, it's not that easy to start with it.

However, there is a project on GitHub that simplifies writing your own ETW provider. And it's a good example of writing:

  • ETW manifest (.man) to disclose event fields
  • WPR profile (.wprp) to teach WPRUI (recorder) about your profiler
  • WPA profile (.wpaProfile) and regions of interest (.xml) to teach WPA about representation of your data.

Please look at the Intel single event API (SEAPI) wiki.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜