Windows 7 CPU performance profiling example


@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

Advertisements
This entry was posted in Programming, Windows. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s