prof-gen, Qprof-gen

Instruments a program for profiling.

IDE Equivalent

Windows: General > PGO Phase

Architectures

IA-32 architecture, Intel® 64 architecture, IA-64 architecture

Syntax

Linux and Mac OS: -prof-gen
-prof-genx
Windows:  /Qprof-gen
/Qprof-genx

Arguments

None

Default

OFF Programs are not instrumented for profiling.

Description

This option instruments a program for profiling to get the execution count of each basic block. It also creates a new static profile information file (.spi).

If -prof-genx or /Qprof-genx is specified, extra information (source position) is gathered for code-coverage tools. If you do not use a code-coverage tool, this option may slow parallel compile times.

If you are doing a parallel make, this option will not affect it.

These options are used in phase 1 of the Profile Guided Optimizer (PGO) to instruct the compiler to produce instrumented code in your object files in preparation for instrumented execution.

Alternate Options

None