Windows 7 memory profiling example

@echo off
set _NT_SYMBOL_PATH=F:\src\Release\;srv*c:\WebSymbol*

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

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


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

start xperfview result.etl

usage: script.cmd [pid]

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: Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.