xperf - 是否需要 DisablePagingExecutive 以允许 xPerf 为在 64 位 Windows 上运行的 32 位应用程序进行堆栈遍历

标签 xperf

我有两个问题:

  1. 我发现一篇博客文章说在使用 xperf 时应该设置 DisablePagingExecutive:

    http://blogs.msdn.com/b/pigscanfly/archive/2009/08/06/stack-walking-in-xperf.aspx

    Disable Paging Executive
    In order for tracing to work on 64-bit Windows you need to set the DisablePagingExecutive registry key. This tells the operating system not to page kernel mode drivers and system code to disk, which is a prerequisite for getting 64-bit call stacks using xperf, because 64-bit stack walking depends on metadata in the executable images, and in some situations the xperf stack walk code is not allowed to touch paged out pages.

    是否需要为在 64 位 Windows 上运行的 32 位应用程序收集 xperf 数据?

  2. 在 64 位操作系统上使用 xperf 为 32 位进程收集数据时,我应该使用 x86 还是 x64 版本?

最佳答案

如果您使用的是 64 位 Windows,则应将 DisablePagingExecutive 设置为 1 并使用 64 位版本的 WPT。

需要 64 位版本的 WPT,因为 32 位版本甚至无法安装在 64 位 Windows 上。

需要将 DisablePagingExecutive 设置为 1,因为即使是 32 位程序也可以调用 64 位内核。为了获得包含内核代码的完整调用堆栈,您需要将元数据锁定到不可分页的内存中,这就是设置 DisablePagingExecutive 所做的。

只需设置它。它的成本不高(它会占用更多的内存),如果您设置了它,则无需担心。

最简单的设置方法是使用跟踪记录 UI。 wprui 是一种选择(它随 Windows Performance Toolkit 一起提供),但我更喜欢 UIforETW。详情在 https://randomascii.wordpress.com/2015/09/24/etw-central/

关于xperf - 是否需要 DisablePagingExecutive 以允许 xPerf 为在 64 位 Windows 上运行的 32 位应用程序进行堆栈遍历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17349882/

相关文章:

asp.net - 我可以使用 xperf 来分析托管代码吗?

performance - 一个进程有多少内存被调出?

xperf - Xperf 或其他东西可以过滤特定进程的 etl 以缩小大小吗?

sdk - Xperfview : What's the difference between CPU sampling and CPU Usage?

windows - 使用 xperf 获取符号

resource-leak - 通过 "System"进程诊断CPU使用率100%的原因

windows - xperf 调用堆栈跟踪,特定于 dll

.net - Windows Xperf diskio 操作不显示程序在性能跟踪 session 期间读取的文件

windows - 使用 wevtutil 安装 WPT list 时出现问题