A listing is a compiler output file (with a .lst suffix) that contains
information about a particular compilation. As a debugging aid, a
compiler listing is useful for determining what has gone wrong in
a compilation. For example, any diagnostic messages emitted during
compilation are written to the listing.
To produce a listing, you can compile with any of the following
options, which provide different types of information:
Listing information is organized in sections. A listing contains
a header section and a combination of other sections, depending on
other options in effect. The contents of these sections are described
as follows.
- Header section
- Lists the compiler name, version, release, the source file name,
and the date and time of the compilation.
- Source section
- If you use the -qsource option, lists the input
source code with line numbers. If there is an error at a line, the
associated error message is displayed after the source line. Lines
containing macros have additional lines showing the macro expansion.
By default, this section only lists the main source file. Use the -qshowinc option
to expand all header files as well.
- Options section
- Lists the options that were in effect during the compilation.
By default, it lists the specified options. To get all options,
specify the -qlistopt option.
- Attribute and cross-reference listing section
- If you use the -qattr or -qxref options,
provides information about the variables used in the compilation unit,
such as type, storage duration, scope, and where they are defined
and referenced. Each of these options provides different information
about the identifiers used in the compilation.
- File table section
- Lists the file name and number for each main source file and include
file. Each file is associated with a file number, starting with the
main source file, which is assigned file number 0. For each file,
the listing shows from which file and line the file was included.
If the -qshowinc option is also in effect, each
source line in the source section has a file number to indicate which
file the line came from.
- PDF report section
- The following information is included in this section when you
use the -qreport option with the -qpdf2 option:
- Loop iteration count
- The most frequent loop iteration count and the average iteration
count, for a given set of input data, are 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 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 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 option -qpdf1=level=2 to
get this report.
You can also select the level of cache to profile
using the environment variable PDF_PM_EVENT during
run time.
- Relevance of profiling data
- This section shows the relevance of the profiling data to the
source code during the -qpdf1 phase. The relevance
is indicated by a number in the range of 0 - 100. The larger the number
is, the more relevant the profiling data is to the source code, and
the more performance gain can be achieved by using the profiling data.
- Missing profiling data
- This section might include a warning message about missing profiling
data. The warning message is issued for each function for which the
compiler does not find profiling data.
- Outdated profiling data
- This section might include a warning message about outdated profiling
data. The compiler issues this warning message for each function that
is modified after the -qpdf1 phase. The warning
message is also issued when the optimization level changes from the -qpdf1 phase
to the -qpdf2 phase.
- Transformation report section
- If the -qreport option is in effect, this section
displays pseudo code that corresponds to the original source code,
so that you can see parallelization and loop transformations that
the -qhot or -qsmp option has
generated. This section of the report also shows additional loop
transformation and parallelization information about loop nests if
you compile with -qsmp and -qhot=level=2.
This
section also reports the number of streams created for a given loop
and the location of data prefetch instructions inserted by the compiler.
To generate information about data prefetch insertion locations, use
the optimization level of -qhot, -O3 -qhot, -O4 or -O5 together
with -qreport.
- Data reorganization section
- Displays data reorganization messages for program variable data
during the IPA link pass when -qreport is used
with -qipa=level=2 or -O5.
Reorganization information includes:
- array splitting
- array transposing
- memory allocation merging
- array interleaving
- array coalescing
- Compilation epilogue section
- Displays a summary of the diagnostic messages by severity level,
the number of source lines read, and whether the compilation was successful.
- Object section
- If you use the -qlist option, lists the object
code generated by the compiler. This section is useful for diagnosing
execution-time problems, if you suspect the program is not performing
as expected due to code generation error.