Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Visual Studio Team System Profiling Tools FAQ

Visual Studio 2008

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.

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.

For details, see How to: Gather Sampling Data Using Command-line Tools, How to: Gather Instrumentation Data Using Command-Line Tools, and How to: Profile Services Using Command Line Tools.

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
  1. On the Tools menu, click Options.

  2. Select Debugging, and then click Symbols.

  3. Verify that Symbol file (.pdb) locations lists all the locations for your symbols. Add locations as necessary.

  4. In Cache symbols from symbol servers to this directory, add the Microsoft Symbol Server location, if necessary: http://msdl.microsoft.com/download/symbols.

  5. Click OK.

  6. 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
  1. On the Tools menu, click Options.

  2. Select Performance Tools.

  3. Make sure that Automatically serialize symbol information is selected.

  4. Click OK.

  5. Re-analyze the file to verify that the fix worked.

To serialize symbols from the command line
  1. If you have the _NT_SYMBOL_PATH variable set, type the following:

    VSPerfReport [/U] <vspfilename.vsp> summary:all /packsymbols
    

    -or-

    If you do not have the _NT_SYMBOL_PATH variable set, type the following:

    VSPerfReport [/U] <vspfilename.vsp> summary:all /packsymbols /symbolpath:<path>
    
  2. Re-analyze the file to verify the fix worked.

For more information, see VSPerfReport.

Other causes

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.

Common causes of this issue, and how to fix it, are listed in the following sections.

Profiling services

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: /user:"network service".
  • 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.

For more information, see VSPerfMon and How to: Profile Services Using Command Line Tools.

Instrumentation mode

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
  1. In Performance Explorer, right-click the Targets folder and then click Add Target Binary.

  2. Browse to the location where the file is located and add the file.

  3. In Performance Explorer, right-click the newly added file and verify that instrumentation is selected for the file.

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

-and-

Visual Studio Team System 2005 Developer Edition

No

No

No

Visual Studio Team System 2008 Team Suite

-and-

Visual Studio Team System 2008 Development Edition

Yes

Yes

No

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.

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.

Additional Resources

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.