Developer Guide and Reference

Contents

Resetting the Dynamic Profile Counters

The
_PGOPTI_Prof_Reset()
function resets the dynamic profile counters. The prototype of the function call is listed below.
Syntax
void _PGOPTI_Prof_Reset(void);
This function is now deprecated. See _PGOPTI_Prof_Reset_All() function, which can be used instead.
One of the activities performed under profile-guided optimization is value-profiling. With value-profiling, the compiler inserts instrumentation to obtain a sample of the variable values in the program. Based upon this sampling, the compiler optimizes the user's code using frequently observed values.
In effect, during a run of an instrumented executable, the segment maintained for each routine executed during that run stores the following information:
  • Number of times each basic block in the routine is executed
  • Specific values observed at each data point undergoing value-profiling
  • Number of times each of these values are observed
When the
_PGOPTI_Prof_Reset()
function is called, the basic block execution count for each basic block is set to 0, and the value-profiling information is reset to indicate that no values were observed at any data point.

Recommended Usage

Use this function to clear the profile counters prior to collecting profile information on a section of the instrumented application. See the example under Dumping Profile Information.