Windows(ETW)包装的C ++事件跟踪 [英] C++ Event Tracing for Windows (ETW) wrapper
问题描述
我一直在调查事件Windows跟踪(ETW),可在现有后端/服务器应用程序中使用.MSDN和其他来源出售了该框架及其与xperf 等,坦率地说,我印象深刻.
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.
但是我有点担心Win32 API和清单文件编译/注册等工作的开销.
However I am a bit concerned by the Win32 APIs and the overhead of working with the manifest coding compilating/registration, etc.
伙计,你呢?
- 推荐吗?在您的系统上使用它时遇到问题吗?
- 知道更多的C ++/STL样式包装器吗?
- 是否有用于管理清单文件的工具?
推荐答案
我建议直接使用WPP,而不是直接使用Win32 API.
Rather than using the Win32 API directly, I would recommend using WPP.
WPP是一个预处理程序,它使您可以在代码中的任何位置编写类似printf的跟踪行,并获得其结果以及其他数据(例如,传递给参数中的各个%d和%s的参数).跟踪)记录到ETW.
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.
这篇关于Windows(ETW)包装的C ++事件跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!