Windows 7 CPU performance profiling example

less than 1 minute read


@echo off
set _NT_SYMBOL_PATH=f:\src\Debug\;srv*c:\WebSymbol*http://msdl.microsoft.com/downloads/symbols

xperf -on Latency -stackwalk profile

echo.
echo Performance Trace started.
echo.
echo When done with profile actions,

pause

echo.
xperf -d Trace.etl

echo.
start xperfview Trace.etl

On windows 64 bits, the following registry should be added to record the call stack.


REG ADD "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" -v DisablePagingExecutive -d 0x1 -t REG_DWORD -f