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 the _PGO_INSTRUMENT pre-processor macro when you compile with either -prof-gen (Linux* and Mac OS* X) or /Qprof-gen (Windows*) options, to instrument your code. Without instrumentation, the Profile IGS functions cannot provide PGO API support.
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 the pgouser.h header file at the top of any source file where the functions may be used.
Example |
---|
#include <pgouser.h> |
You do not need to remove the Profile IGS API functions from your code when you have completed the instrumentation step. Changes to the source code at this stage could inhibit obtaining profile data feedback on the routines that were modified. For the instrumentation step (using -[Q]prof-gen or -[Q]prof-genx option), the definition for the _PGO_INSTRUMENT macro is automatically set, allowing instrumentation library routines to be used. For the production step (using -[Q]prof-use option), the definition for the _PGO_INSTRUMENT macro is removed, allowing profile data to be fed back.
The environment variable for Profile IGS is INTEL_PROF_DUMP_INTERVAL. This environment variable may be used to initiate Interval Profile Dumping in an instrumented user application.
Copyright © 1996-2011, Intel Corporation. All rights reserved.