我有两个问题:
我发现一篇博客文章说在使用
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 theDisablePagingExecutive
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
数据?在 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/