Visual Studio Team System Profiling Tools FAQ
Visual Studio Team System profiling tools, also known as the profiler, provide performance data for your application. These tools are available in the Team Suite, Team Developer, and Development editions. Use this topic to answer common questions about how to use the profiling tools in Visual Studio Team System.
Why did my symbols resolve incorrectly?
When you analyze a performance report, you might see function addresses, or no information, instead of function names in the report. Common causes of this issue, and how to fix it, are listed in the following sections.
VSPerfCLREnv has not been set correctly
When you run the profiling tools from the command line, you must tell the operating system how to find the managed application to be profiled and the processes that it must have to profile the application. To do this, you use the VSPerfCLREnv tool. If the correct environment was not set during profiling, a warning is reported during analysis and the managed function names will be blank.
When you have finished profiling an application, you also have to delete the environmental variables that you set.
Debugger symbols are set incorrectly
When the debugger cannot locate the necessary symbol files, symbols in performance reports might not resolve correctly. The profiling tools share symbol paths with the debugger.
You can check to see where the profiling tools are looking for symbol information.
To determine where the profiling tools are looking for symbols
At the command prompt, type the following;
VSPerfReport [/U] <vspfilename.vsp> /debugsympath
A list of all the locations where the profiling tools are looking for symbols appears. Use this information to determine whether a path is missing.
As soon as you know where the profiling tools are looking for symbols, you can update this information to add any missing paths.
To add locations for debugger symbols
On the Tools menu, click Options.
Select Debugging, and then click Symbols.
Verify that Symbol file (.pdb) locations lists all the locations for your symbols. Add locations as necessary.
In Cache symbols from symbol servers to this directory, add the Microsoft Symbol Server location, if necessary:
Re-analyze the file to see whether the fix worked.
For more information, see How to: Specify a Symbol Path.
Symbols are not serialized
Serializing symbols will pack your symbols into the .vsp file so that you can open it later without having to access .pdb, .dll, or .exe files.
To serialize symbols from the IDE
On the Tools menu, click Options.
Select Performance Tools.
Make sure that Automatically serialize symbol information is selected.
Re-analyze the file to verify that the fix worked.
To serialize symbols from the command line
If you have the _NT_SYMBOL_PATH variable set, type the following:
VSPerfReport [/U] <vspfilename.vsp> summary:all /packsymbols
If you do not have the _NT_SYMBOL_PATH variable set, type the following:
VSPerfReport [/U] <vspfilename.vsp> summary:all /packsymbols /symbolpath:<path>
Re-analyze the file to verify the fix worked.
For more information, see VSPerfReport.
If the previous suggestions do not fix your symbol issues, you can try the following:
- Copy the .pdb. .dll, & .exe files to the same directory as the .vsp file, and then open the .vsp file.
Why do I get the error "No Data was Collected"?
Common causes of this issue, and how to fix it, are listed in the following sections.
When profiling services, this error typically occurs for one or more of the following reasons:
- The target process is running under another user, such as (SYSTEM/network service).
To correct this issue, include the /user option to connect to vsperfmon.exe and run with the user's credentials. For example:
- You are running the profiling tools on Windows Vista or later versions, which requires you to access Session 0 where services run. The monitor runs in the current user session, rather than Session 0.
To correct this issue, you must use the /crosssession option to allow a different user session to connect to vsperfmon.exe.
In instrumentation mode, the error commonly occurs because the binary file you have selected to profile is not being called when the application runs.
For example, if you try to instrument a release mode .dll, but the application is calling the debug .dll, the performance session would seem to run correctly, but no data would be collected because the release .dll is never triggered.
When instrumenting Web applications, you might also see the "No data was collected" error. Often, after you add a Web application to the performance session, you must manually add class library and other binary files to the performance session in order for them to be included.
To manually add a file for profiling
In Performance Explorer, right-click the Targets folder and then click Add Target Binary.
Browse to the location where the file is located and add the file.
In Performance Explorer, right-click the newly added file and verify that instrumentation is selected for the file.
Do the profiling tools work on 64-bit operating systems?
The following table outlines which Visual Studio Team System versions support the use of profiling tools on 64-bit operating systems.
|Version||32-bit applications on x64-bit operating systems and hardware||64-bit applications on x64-bit operating systems and hardware||IA-64|
Visual Studio Team System 2005 Team Suite
Visual Studio Team System 2005 Developer Edition
Visual Studio Team System 2008 Team Suite
Visual Studio Team System 2008 Development Edition
Visual Studio Team System 2008 Specifics
Visual Studio Team System 2008 provides complete profiling tool support on x64 operating systems. Sampling mode, instrumentation mode, and memory profiling are fully supported. For more information, see Microsoft Visual Studio Team System 2008 System Requirements.
Visual Studio Team System 2005 Specifics
If you try to use the Visual Studio Team System 2005 profiling tools in sampling mode on a computer that has a 64-bit operating system, you will see the following error:
Profiling WOW64 processes is not supported by this version of the profiling tools.
If you try to use the Team System 2005 profiling tools in instrumentation mode on a computer that has a 64-bit operating system, you might see the following error:
The monitor was unable to start the kernel mode driver (VSPerfDrv.sys).
To accurately profile applications on a 64-bit operating system, you must upgrade to Visual Studio Team System 2008.
Do the profiling tools work on Virtual PC?
The profiling tools do not work on any virtual environment, such as Virtual PC, Virtual Server, and so on, because of driver restrictions. To date, there is no work around for this issue. For a list of supported usage scenarios, see Clients for Team Foundation Server.