检测 ETW 何时丢弃事件
如何确定 ETW 会话是否正在丢弃事件?
如果正在丢弃事件,如何配置跟踪会话以便不丢弃事件?
我已经写过自定义 ETW 提供程序可帮助进行一些调试工作。我目前正在使用 logman.exe 捕获跟踪数据。
在查看结果时,似乎某些事件正在被删除。基本上我正在寻找类似的东西:
事件A 事件 C
应该是中间事件 B,但它没有出现在跟踪文件中。这种情况应该是不可能发生的,这让我相信 ETW 正在丢弃事件。
当然,我想验证我看到的问题是由于事件丢失造成的,而不是由代码中的错误引起的。我尝试过谷歌,但无法想出任何东西。有谁知道我如何检查事件是否被删除?
How can I determine if an ETW session is dropping events?
If it is dropping events, how can I configure the tracing session so that events are not dropped?
I've written a custom ETW provider to help with some debugging efforts. I'm currently capturing the trace data using logman.exe.
In viewing the results, it appears that some of the events are being dropped. Basically I'm seeking something like:
Event A
Event C
where their should be an intervening Event B, but one does not appear in the trace file. It should be impossible for that to happen, which leads me to believe that ETW is dropping events.
Of course, I'd like to verify that the problem I'm seeing is due to dropped events, and not caused by a bug in my code. I've tried Google, but wasn't able to come up with anything. Does any one know how I can check to see if events are being dropped?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它没有直接回答问题(如何检测掉落),但它可能会解释掉落:
EVENT_TRACE_NO_PER_PROCESSOR_BUFFERING
It doesn't answer the question directly (how to detect drops), but it might explain drops:
EVENT_TRACE_NO_PER_PROCESSOR_BUFFERING
我一直在使用 logman 来捕获结果。看起来跟踪日志将为我提供有关丢失事件的信息,并且我可以调整其缓冲区参数以减少事件丢失。
I've been using logman to capture the results. It looks like tracelog will give me info about lost events, and I can tweek its buffer parameters to reduce the event loss.
如果您使用 xperf 收集日志,它会在事件丢失时生成警告。使用 xperf,您还可以调整缓冲区大小,并将日志记录划分到多个记录器。
If you use xperf to collect the logs, it generates a warning when events are lost. With xperf you can also play with the buffer size and can divide the logging to several loggers.