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.
Operating System |
Syntax Examples |
---|---|
Linux and Mac OS X |
icpc -prof-use -opt-report -opt-report-phase=pgo pgotools_sample.c |
Windows |
icl /Qprof-use /Qopt-report /Qopt-report-phase:pgo pgotools_sample.c |
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.
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.c;-1:-1;PGO;_main;0> DYN-VAL: pgotools_sample.c _main <pgotools_sample.c;-1:-1;PGO;_three_args;0> DYN-VAL: pgotools_sample.c _three_args <pgotools_sample.c;-1:-1;PGO;_two_args;0> NO-DYN: pgotools_sample.c _two_args <pgotools_sample.c;-1:-1;PGO;_one_arg;0> DYN-VAL: pgotools_sample.c _one_arg <pgotools_sample.c;-1:-1;PGO;_decide;0> DYN-VAL: pgotools_sample.c _decide <pgotools_sample.c;-1:-1;PGO;;0> 4 FUNCTIONS HAD VALID DYNAMIC PROFILES 1 FUNCTIONS HAD NO DYNAMIC PROFILES FILE CURRENT QUALITY METRIC: 90.0% FILE POSSIBLE QUALITY METRIC: 90.0% 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:
|
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. |