Windows 7 memory profiling another example

@echo off

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

xperf -on Base+Cswitch -BufferSize 1024 -MinBuffers 512 -MaxBuffers 512
xperf -start HeapSession -heap -Pids %1 -BufferSize 1024 -MinBuffers 512 -MaxBuffers 512 -stackwalk HeapAlloc+HeapRealloc

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

pause 

echo Generating the report. 

xperf -stop HeapSession -stop -d heapUsage.etl

echo.
start xperfview heapUsage.etl

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

One Response to Windows 7 memory profiling another example

  1. acrocontext says:

    if you want to record from the starting point of application you can use -PidNewProcess option. For example) -PidNewProcess “C:\Program Files\Windows Sidebar\sidebar.exe”

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