I've 3 new tricks to add to a few of my earlier postings:
1. In my batch file for VSTS profiling I use sleep.exe. This isn't on a few of my machines, so you may not have it either. A quick web search shows this is part of the Windows Server 2003 resource kit. You can download it here (11.8 MB).
2. Also included in that download is kernrate, a free command-line tool that can profile both kernel & user-mode time. This is a sample-based profiler. Take a look at at some example output on this blog entry I found.
3. When moving VSP files between machines symbols stop resolving, even when the symbol files are copied directly to the 2nd machine. This is annoying, so to avoid that hassle, make sure to always run this command before copying a VSP file. In fact, this would make a nice batch file:
vsperfreport /summary:all /packsymbols %1
copy %1 %2
I've had trouble getting symbols to resolve using _NT_SYMBOL_PATH, so you can save yourself some headache by just copying all the symbols to the same directory as the VSP file before running vsperfreport. By the way, vsperfreport is in the same directory as the other VSTS profiling tools (e.g., vsperfcmd, vsperfclrenv):
REM %1 is the symbol path, %2 is the VSP file name, and %3 is the destination
xcopy /E %1 .
vsperfreport /summary:all /packsymbols %2
copy %2 %3