perfmon 性能计数器是否基于“底层”相同的东西?作为 xperf 使用的 ETW 事件?

发布于 2024-10-01 14:28:08 字数 224 浏览 0 评论 0原文

我最近开始熟悉 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

╰つ倒转 2024-10-08 14:28:08

性能计数器ETW 是两个不同的东西,它们不共享底层基础结构。

计数器用于提供
关于效果如何的信息
操作系统或应用程序,
服务或驱动程序正在执行。这
计数器数据可以帮助确定系统
瓶颈和微调系统
应用性能。经营的
系统、网络和设备提供
应用程序可以计数器的数据
消费为用户提供
系统运行情况的图形化视图
正在表演。

Windows 事件跟踪 (ETW) 是一个
高效的内核级跟踪
允许您记录内核或
应用程序定义的事件记录到日志
文件。

它们都可以用于性能分析,但 ETW 提供应用程序内部随时间变化的行为审计跟踪(如传统的用户模式日志文件),而 PerfMon 提供应用程序中当前统计信息的视图(“当前队列长度”) ),或整个生命周期内的聚合数据(例如“平均吞吐量”、“发送的字节总数”)。

Perf counters and ETW are two different things, they share no underlying infrastructure.

Counters are used to provide
information as to how well the
operating system or an application,
service, or driver is performing. The
counter data can help determine system
bottlenecks and fine-tune system and
application performance. The operating
system, network, and devices provide
counter data that an application can
consume to provide users with a
graphical view of how well the system
is performing.

Event Tracing for Windows (ETW) is an
efficient kernel-level tracing
facility that lets you log kernel or
application-defined events to a log
file.

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').

看春风乍起 2024-10-08 14:28:08

似乎基于 此文档 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.

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文