perfmon 性能计数器是否基于“底层”相同的东西?作为 xperf 使用的 ETW 事件?
我最近开始熟悉 perfmon 和 xperf。 Perfmon 使用性能计数器,xperf 使用 ETW(Windows 事件跟踪)。 Perfmon 具有提供数据的对象,而 xperf 使用“提供者”组。作为这个领域的新手,我想问是否有人可以告诉我 perfmon 使用的性能计数器是否真的基于与 xperf 使用的 ETW 事件相同的东西,如果是这样,您能否澄清其中的联系。如果它们不是基于同一事物,您能解释一下它们有何不同吗?
I have recently been becoming acquainted with perfmon and with xperf. Perfmon uses performance counters and xperf uses ETW (event tracing for windows). Perfmon has objects that provide data, whereas xperf uses groups of "providers". As a newbie into this area I am asking whether anyone could tell me whether the performance counters used by perfmon are really based on the same thing under the hood as the ETW events used by xperf and if so, could you make the connection clear. If they aren't based on the same thing, could you explain how they are different?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
性能计数器 和 ETW 是两个不同的东西,它们不共享底层基础结构。
它们都可以用于性能分析,但 ETW 提供应用程序内部随时间变化的行为审计跟踪(如传统的用户模式日志文件),而 PerfMon 提供应用程序中当前统计信息的视图(“当前队列长度”) ),或整个生命周期内的聚合数据(例如“平均吞吐量”、“发送的字节总数”)。
Perf counters and ETW are two different things, they share no underlying infrastructure.
They can both be used for performance analysis, but ETW provides an audit trail of behaviour inside the app over time (like a traditional user-mode logfile), whereas PerfMon provides a view of either current statistics in the application ('current queue length'), or aggregated data over its lifetime (such as 'average throughput', 'total number of bytes sent').
似乎基于 此文档 Vista+ 性能计数器具有 ETW Façade,因此可以按照与 ETW 完全相同的方式使用它们。
Windows Vista® 中包含的新性能计数器库(PERFLIB 版本 2.0)为开发人员提供了许多优势,包括:
提供者和使用者之间基于 Windows 事件跟踪的标准进程间通信 (IPC) 机制( ETW) 通知,从而简化开发并提高代码的统一性和可靠性。
It would seem that based on this document starting in Vista+ performance counters have an ETW Façade so they can be consumed exactly in the same way as ETW.
The new Performance Counter Library (PERFLIB version 2.0) included with Windows Vista® offers a number of advantages to the developer, including:
A standard inter-process communication (IPC) mechanism between a provider and consumer that is based on Event Tracing for Windows (ETW) notification, and which results in simplified development and more uniform and reliable code.