VSPerfMon

You can use VSPerfMon tool to collect performance data for an application; typically this tool is launched by VSPerfCmd.exe. VSPerfMon displays additional information about process attach or detach which is not available by using the VSPerfCmd tool. To view this information, start VSPerfMon in a separate window. To invoke VSPerfMon use the following syntax:

VSPerfMon [/U] </TRACE [/COUNTER:cfg] | /SAMPLE | /COVERAGE> /CROSSSESSION /OUTPUT <file name> [/WINCOUNTER:cfg] [/USER [DOMAIN\]username]

The following table describes VSPerfMon tool options:

Options

Description

U

Redirected console output is written as Unicode. This must be the first option specified.

OUTPUT:<file name>

Redirects output to the specified file name.

TRACE

Starts performance monitor for instrumented profiling.

SAMPLE

Starts the performance monitor for sampling profiling.

COVERAGE

Starts the performance monitor for code coverage collection.

CONCURRENCY

Starts the performance monitor for concurrency profiling. By default, the /CONCURRENCY option collects resource contention data and thread visualization and execution data. You can specify one of the following options to restrict the collected to resource contention data or to thread visualization and execution data.

  • To collect only resource contention data, specify the /RESOURCEONLY option with the /CONCURRENCY option.

  • To collect only thread visualization and execution data, specify the /THREADONLY option with the /CONCURRENCY option.

To collect both resource contention data and thread visualization and execution data, use /CONCURRENCY without either the /THREADONLY option with the /CONCURRENCY option.

USER:[domain\]username

Allows client access to the performance monitor from the specified account.

CROSSSESSION

Enables cross-session profiling.

COUNTER:cfg

When the instrumentation (TRACE) profiling method is used, specifies a CPU counter to be collected at each instrumentation point. You can collect multiple counter data by specifying multiple Counter options.

Use the following syntax to specify the counter (cfg) data:

CounterName[,Reload[,FriendlyName]]

  • CounterName is the name of a counter returned by the VSPerfCmd /QueryCounters command.

  • Reload is the counter event sampling interval. Do not use Reload with the instrumentation method.

  • When specified, FriendlyName replaces CounterName in Profiling Tools report column names.

WINCOUNTER:path

Specifies a Windows performance counter to include with mark data. path is a Windows Performance counter string in PDH counter path format. For example:

\Processor(0)\% Processor Time

\System\Context Switches/sec

AUTOMARK:n

Specifies the time interval (in milliseconds) between automatic marks when you use /WINCOUNTER. Rounded up to the nearest 500ms.

Use 0 to disable automatic marks. (default=500ms if unspecified)

See Also

Reference

VSInstr

VSPerfCmd

VSPerfReport

Other Resources

Profiling Tools Report Views