PGO API Support Overview

The Profile Information Generation Support (Profile IGS) lets you control the generation of profile information during the instrumented execution phase of Profile-guided Optimizations.

A set of functions and an environment variable comprise the Profile IGS. The remaining topics in this section describe the associated functions and environment variables.

The compiler sets a define for _PGO_INSTRUMENT when you compile with either -prof-gen (Linux*) or /Qprof-gen (Windows*) or -prof-genx (Linux) or /Qprof-genx (Windows). Without instrumentation, the Profile IGS functions cannot provide PGO API support.

Note

The Profile IGS functions are written in the C language. Fortran applications must call C functions.

Normally, profile information is generated by an instrumented application when it terminates by calling the standard exit() function.

To ensure that profile information is generated, the functions described in this section may be necessary or useful in the following situations:

You can use the Profile IGS functions in your application by including a header file at the top of any source file where the functions may be used.

Example

INCLUDE "pgouser.h"

The Profile IGS Environment Variable

The environment variable for Profile IGS is PROF_DUMP_INTERVAL. This environment variable may be used to initiate Interval Profile Dumping in an instrumented user application. See the recommended usage of _PGOPTI_Set_Interval_Prof_Dump() for more information.