/PROFILE (Performance Tools Profiler)

Produces an output file that can be used with the Performance Tools profiler.

Syntax

/PROFILE

Remarks

/PROFILE implies the following linker options:

/PROFILE causes the linker to generate a relocation section in the program image. A relocation section allows the profiler to transform the program image to get profile data.

/PROFILE is only available only in Enterprise (team development) versions. For more information on PREfast, see Code Analysis for C/C++ Overview.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Expand the Configuration Properties node.

  3. Expand the Linker node.

  4. Select the Advanced property page.

  5. Modify the Profile property.

To set this linker option programmatically

  1. See Profile.

To set this linker option within Visual Studio CMake project

CMake project does not have a Property Pages, the linker options can be set by modifing the CMakeLists.txt.

  1. Open the CMakeLists.txt in the project root directory.

  2. Add code below. For details, see CMake references

  3. Rebuild your solution.

SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/PROFILE")

See Also

MSVC linker reference
MSVC Linker Options