Enable Profiling

OverviewDetails

Feature Only in Professional and Enterprise Editions   Profiling is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .

Before using the profiler, you must build the current project with profiling enabled (equivalent to the command line setting LINK /PROFILE). If you want to perform function profiling only in the current project, you only need to enable profiling for the linker.

If you want to do line profiling, you also need to include debugging information.

To build your project for function profiling

  1. On the Build menu, click Settings to display the Project Settings dialog box.

  2. Click the Link tab.

  3. In the Category drop-down list box, click General.

  4. Select the Enable Profiling check box.

  5. Click OK.

  6. On the Build menu, click Buildprojectname.exe.

Note   Selecting the Enable Profiling check box turns off incremental linking. To re-enable incremental linking, clear the Enable Profiling option.

To build your project for line profiling

  1. Perform the procedure to enable function profiling described earlier in this topic.

  2. Select the Generate Debug Info check box.

  3. Click the C/C++ tab.

  4. In the Category drop-down list box, click General.

  5. In the Debug Info drop-down list box, click Program Database or Line Numbers Only.

  6. Click OK.

  7. On the Build menu, click Buildprojectname.exe.

When the build is complete, the project is ready to be profiled.