Profile-guided Optimization (PGO) Report

The PGO report can help to identify can help identify where and how the compiler used profile information to optimize the source code. The PGO report is most useful when combined with the PGO compilation steps outlined in Profile an Application. Without the profiling data generated during the application profiling process the report will generally not provide useful information.

Combine the final PGO step with the reporting options by including -prof-use (Linux* and Mac OS* X) or /Qprof-use (Windows*). The following syntax examples demonstrate how to run the report using the combined options.

Platform

Syntax Examples

Linux and Mac OS X

ifort -prof-use -opt-report -opt-report-phasepgo pgotools_sample.f90

Windows

ifort /Qprof-use /Qopt-report /Qopt-report-phase:pgo pgotools_sample.f90

By default the PGO report generates a medium level of detail. You can use -opt-report-file (Linux and Mac OS X) or /Qopt-report-file (Windows) to specify an output file to capture the report results. Specifying a file to capture the results can help to reduce the time you spend analyzing the results and can provide a baseline for future testing.

Reading the Output

Running maximum PGO report results can produce long and detailed results. Depending on the sources being profiled, analyzing the report could be very time consuming. The following sample report illustrates typical results and element formatting for the default output.

Sample PGO Report

<pgotools_sample.f90;-1:-1;PGO;_DELEGATE.;0>

  DYN-VAL:  pgotools_sample.f90  _DELEGATE.

<pgotools_sample.f90;-1:-1;PGO;_ADDERMOD.;0>

  NO-DYN:   pgotools_sample.f90  _ADDERMOD.

<pgotools_sample.f90;-1:-1;PGO;_ADDERMOD_mp_MOD_ADD;0>

  DYN-VAL:  pgotools_sample.f90  _ADDERMOD_mp_MOD_ADD

<pgotools_sample.f90;-1:-1;PGO;_DELEGATE;0>

  DYN-VAL:  pgotools_sample.f90  _DELEGATE

<pgotools_sample.f90;-1:-1;PGO;_MAIN__;0>

  DYN-VAL:  pgotools_sample.f90  _MAIN__

<pgotools_sample.f90;-1:-1;PGO;_MAIN._MAIN_ADD;0>

  DYN-VAL:  pgotools_sample.f90  _MAIN._MAIN_ADD

<pgotools_sample.f90;-1:-1;PGO;;0>

      5 FUNCTIONS HAD VALID DYNAMIC PROFILES

      1 FUNCTIONS HAD NO DYNAMIC PROFILES

  FILE CURRENT  QUALITY METRIC:  91.7%

  FILE POSSIBLE QUALITY METRIC:  91.7%

  FILE QUALITY  METRIC RATIO:   100.0%

The following table summarizes some of the common report elements and provides a general description to help interpret the results.

Report Element

Description

String listing information about the function being reported on. The string uses the following format.

<source name>;<start line>;<end line>;<optimization>; <function name>;<element type>

The compact string contains the following information:

  • <source name>: Name of the source file being examined.

  • <start line>: Indicates the starting line number for the function being examined. A value of -1 means that the report applies to the entire function.

  • <end line>: Indicates the ending line number for the function being examined.

  • <optimization>: Indicates the optimization phase; for this report the indicated phase should be PGO.

  • <function name>: Indicates the name of the function.

  • <element type>: Indicates the type of the report element; 0 indicates the element is a comment.

DYN-VAL

Indicates that valid profiling data was generated for the function indicated; the source file containing the function is also listed.

NO-DYN

Indicates that no profiling data was generated for the function indicated; the source file containing the function is also listed.

FUNCTIONS HAD VALID DYNAMIC PROFILES     

Indicates the number of functions that had valid profile information.

FUNCTIONS HAD NO DYNAMIC PROFILES

Indicated the number of functions that did not have valid profile information. This element could indicate that the function was not executed during the instrumented executable runs.

FUNCTIONS HAD VALID STATIC PROFILES

Indicates the number of functions for which static profiles were generated.

The most likely cause for having a non-zero number is that dynamic profiling did not happen and static profiles were generated for all of the functions.

IPO CURRENT QUALITY METRIC

Indicates the general quality, represented as a percentage value between 50% and 100%t. A value of 50% means no functions had dynamic profiles, and a value of 100% means that all functions have dynamic profiles. The larger the number  the greater the percentage of functions that had dynamic profiles.

IPO POSSIBLE QUALITY METRIC

Indicates the number of possible dynamic profiles. This number represent the best possible value, as a percentage, for Current Quality. This  number is the highest value possible and represents the ideal quality for the given data set and the instrumented executable.

IPO QUALITY METRIC RATIO

Indicates the ratio of Possible Quality to Current Quality. A value of 100% indicates that all dynamic profiles were accepted. Any value less than 100% indicates rejected profiles.