The new diagnostic reports can help you identify
opportunities to improve the performance of your code.
Compiler reports in XML format
It is now possible to get information in XML format about
the optimizations that the compiler was able to perform and also which
optimization opportunities were missed. This information can be used
to reduce programming effort for tuning applications, especially high-performance
applications.
The information from the compiler is produced
in XML 1.0 format. The report is defined by an XML schema and is easily consumable by tools that you can create
to read and analyze the results. A stylesheet, xlstyle.xsl,
is provided to render the report into a human readable format that
can be read by anyone with a browser which supports XSLT.
In
this release, the following four optimization categories are available
in the report:
- Inlining
- Loop transformations
- Data reorganizations
- Profile-directed feedback information
The new
-qlistfmt option and its associated
suboptions can be used to generate the new XML 1.0 report.
For
detailed information about this report and how to use it, see Using reports to diagnose optimization
opportunities.
Enhancements to profiling reports
Additional
sections of the listing report have been added to help you understand your
programs. When using the
-qreport option with the
-qpdf2 option,
you can get the following additional sections added to your listing
file in the section entitled
PDF Report:
- Loop iteration count
- The most frequent loop iteration count and the average iteration
count, for a given set of input data, is calculated for most loops
in a program. This information is only available when the program
is compiled at optimization level -O5.
- Block and call count
- This section of the report covers the call structure
of the program and the respective execution count for each called
function. It also includes block information for each function. For
non-user defined functions, only execution count is given. The total
block and call coverage, and a list of the user functions ordered
by decreasing execution count are printed in the end of this report
section. In addition, the block count information is printed at the
beginning of each block of the pseudo-code in the listing files.
- Cache miss
- This section of the report is printed in a single table.
It reports the number of cache misses for certain functions, with
additional information about the functions such as: cache level, cache
miss ratio, line number, file name, and memory reference.
Note: You
must use the -qpdf1=level=2 option to
get this report.
You can also select the level of cache to profile
using the PDF_PM_EVENT environment variable during
run time.
For detailed information about the
profile-directed feedback, see Using profile-directed feedback.
For additional information about the listing files, see Compiler
listings
Report of data reorganization
The
compiler can generate the following information in the listing files:
- Data reorganizations (a summary of how program variable
data gets reorganized by the compiler)
- The location of data prefetch instructions inserted by the compiler
To generate data reorganization
information, specify the optimization level
-qipa=level=2 or
-O5 together
with
-qreport. The data reorganization messages
for program variable data are added to the data reorganization section
of the listing file with the label
DATA REORGANIZATION
SECTION during the IPA link pass. Reorganizations include:
- array splitting
- array transposing
- memory allocation merging
- array interleaving
- array coalescing
To generate information about data prefetch insertion
locations, use the optimization level of -qhot,
or any other option that implies -qhot together
with -qreport. This information appears in the LOOP
TRANSFORMATION SECTION of the listing file.
Additional loop analysis
A new
suboption has been added to -qhot to add more aggressive
loop analysis. -qhot=level=2 together with -qsmp and -qreport add information about loop nests on
which the aggressive loop analysis was performed to the LOOP
TRANSFORMATION SECTION of the listing file. This information
can also appear in the XML listing file created with the -qlistfmt option.
New and enhanced diagnostic options
The
entries in the following table describe new or changed compiler options
and directives that give you control over compiler listings.
Information presented here is a brief overview. For detailed
information about these and other performance-related compiler options,
see Listings, messages and compiler information.
Table 1. Listings-related compiler options and directives| Option/directive |
Description |
| -qlistfmt |
Generates a report in an XML 1.0 format containing
information about optimizations performed by the compiler and missed
optimization opportunities. The report contains information about
inlining, loop transformations, data reorganization and
profile-directed feedback. |
| -qreport |
The listing now contains a PDF report section
when used with -qpdf2. Another new section in the
listing files is a DATA REORGANIZATION section when
used with -qipa=level=2 or -O5. |
| -qskipsrc |
Determines whether the source statements skipped
by the compiler are shown in the SOURCE section of
the listing file. |