The _PGOPTI_Prof_Dump() function dumps the profile information collected by the instrumented application. The prototype of the function call is listed below.
Syntax |
---|
void _PGOPTI_Prof_Dump(void); |
The profile information is generated in a .dyn file (generated in phase 2 of the PGO).
Insert a single call to this function in the body of the function which terminates the user application. Normally, _PGOPTI_Prof_Dump() should be called just once. It is also possible to use this function in conjunction with _PGOPTI_Prof_Reset() function to generate multiple .dyn files (presumably from multiple sets of input data).
Example |
---|
! selectively collect profile information |
This subsection provides an example of how to call the C PGO API routines from Fortran. For complete description of the PGO API support routines, see PGO API: Profile Information Generation Support.
As part of the instrumented execution phase of profile-guided optimization, the instrumented program writes profile data to the dynamic information file (.dyn file). The file is written after the instrumented program returns normally from PROGRAM() or calls the standard exit function. Programs that do not terminate normally, can use the _PGOPTI_Prof_Dump function. During the instrumentation compilation, using the -prof-gen (Linux*) or /Qprof-gen (Windows*) option, you can add a call to this function to your program.
Here is an example:
Example |
---|
INTERFACE |
Note
You must remove the call or comment it out prior to the feedback compilation with -prof-use (Linux) or /Qprof-use (Windows).