How to: Gather Instrumentation Data using Command-line Tools
You can use either the IDE or the VSInstr command-line tool to instrument your application. In this topic, we will use command-line tools to instrument code.
Command-line tools are located in C:\Program Files\Microsoft Visual Studio 8\Team Tools\Performance Tools> directory.
To include symbol information in release build, see.
To instrument a binary using the command-line tool
Open a command line window. At the command prompt, run the following command to instrument your binary:
C:\<path>vsinstr c:\<path>\application_name.exe /control:thread
The original binary is renamed with .orig extension. A copy of the original file is instrumented.
At the command prompt, run the following command to launch VSPerfCmd:
C:\<path>vsperfcmd /trace /output:c:\<path>
A report with .VSP extension is created in the folder specified in the /output option.
Start your application from the command line.
Run your application's scenarios to generate performance data.
Exit your application.
At the command prompt, run the following command to shut down the performance monitor:
Open the .VSP file in the IDE to examine performance data.