Windows 7 memory profiling example


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

xperf -on base
xperf -start heapsession -heap -pids %1 -stackwalk HeapAlloc+HeapRealloc -BufferSize 512 -MinBuffers 128 -MaxBuffers 512

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

pause

xperf -stop heapsession -d heap.etl
xperf -d main.etl
xperf -merge main.etl heap.etl result.etl

echo.
start xperfview result.etl

usage: script.cmd [pid]

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