Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

How to: Gather Instrumentation Data using Command-line Tools

Visual Studio 2005

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 How to: Use Symbol Servers.

To instrument a binary using the command-line tool

  1. 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.

  2. 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.

  3. Start your application from the command line.

  4. Run your application's scenarios to generate performance data.

  5. Exit your application.

  6. At the command prompt, run the following command to shut down the performance monitor:

    c:\<path>vsperfcmd /shutdown

  7. Open the .VSP file in the IDE to examine performance data.

See Also



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.