VSPerfCmd
The VSPerfCmd.exe tool is used to start and stop performance data collection. It uses the following syntax:
VSPerfCmd [/U] [/options]
The following tables describe VSPerfCmd.exe tool options.
Option | Description |
---|---|
U | Redirected console output is written as Unicode. Must be the first option specified. |
Start : mode |
Starts the profiling service in the specified mode. |
Output : filename |
Specifies the output file name. Use only with Start. |
CrossSession|CS | Enables profiling across Windows sessions. Use only with Start, Attach, or Launch. |
User :[domain\ ]username |
Enables the specified account access to the profiler service. Use only with Start. |
WaitStart[:n ] |
Waits for the data collection logger to initialize. If n is specified, VSPerfCmd will wait at most n seconds. If n is not specified, VSPerfCmd will wait indefinitely. This eases use of VSPerfCmd as part of a batch process. |
Counter : cfg |
When the sample profiling method is used, specifies a CPU counter and the number of events to use as the sampling interval. You can sample only one counter value. When the instrumentation profiling method is used, specifies a CPU counter to be collected at each instrumentation point. Use only with Start: Trace , Attach, or Launch. |
QueryCounters | Displays a list of valid CPU counters for the current machine. |
WinCounter : path | Specifies a Windows performance counter event to include with profile mark data. Use only with Start. |
AutoMark : n | Specifies the time interval (in milliseconds) between Windows performance counter data collection events. Use with WinCounter. |
Events : option |
Controls collection of specified Event Tracing for Windows (ETW) events. ETW data is collected to an .itl file that is not the profiling data (.vsp) file. |
Status | Displays the state of the profiler, information about processes that are currently being profiled, and accounts that have authority to control the profiler. |
Shutdown[:n ] |
Closes the profiling data file and turns the profiler off. |
GlobalOn | Resumes data collection after a call to VSPerfCmdGlobalOff. |
GlobalOff | Stops all data collection, but does not end the profiling session. |
ProcessOn : pid |
Resumes data collection for the specified process after profiling was paused by a call to VSPerfCmdProcessOff. |
ProcessOff : pid |
Stops data collection for the specified process. |
ThreadOn and ThreadOff : tid | Resumes profiling for the specified process after profiling was paused by a call to VSPerfCmdThreadOff. Use ThreadOn only when profiling with the instrumentation method. |
ThreadOn and ThreadOff : tid | Pauses profiling for the specified thread. Use ThreadOff only when profiling with the instrumentation method. |
Mark : MarkNum[,MarkText] | Inserts a mark into the profiling data file, with optional text. |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for