Skip to content

Latest commit

 

History

History
63 lines (37 loc) · 2.03 KB

profile-performance-tools-profiler.md

File metadata and controls

63 lines (37 loc) · 2.03 KB
description title ms.date f1_keywords helpviewer_keywords
Learn more about: /PROFILE (Performance Tools Profiler)
/PROFILE (Performance Tools Profiler)
10/13/2021
VC.Project.VCLinkerTool.Profile
-PROFILE linker option
/PROFILE linker option

/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 is used to support the Performance Tools for Visual Studio Profiler utility VSInstr.exe.

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. Select the Configuration Properties > Linker > Advanced property page.

  3. Modify the Profile property.

To set this linker option programmatically

  1. See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.Profile%2A.

To set this linker option in a Visual Studio CMake project

Because a CMake project doesn't have the usual Property Pages support, the linker option can be set by modifying the CMakeLists.txt file.

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

  2. Add the code below. For more information, see the CMake set_target_properties documentation.

    SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/PROFILE")
  3. Rebuild your solution.

See Also

MSVC linker reference
MSVC linker options