z/OS XL C++ compiler listing components

The following information describes the components of a C++ compiler listing.These are available for regular and IPA compilations. Differences in the IPA versions of the listings are noted. Using the IPA link step listing describes IPA-specific listings.

Heading information

The first page of the listing is identified by the product number, the compiler version and release numbers, the name of the data set or z/OS® UNIX System Services file containing the source code, the date and time compilation began (formatted according to the current locale), and the page number.

Note: If the name of the data set or z/OS UNIX file that contains the source code is greater than 32 characters, it is truncated. Only the right-most 32 characters appear in the listing.

Prolog section

The Prolog section provides information about the compile-time library, file identifiers, compiler options, and other items in effect when the compiler was invoked.

All options except those with no default (for example, DEFINE) are shown in the listing. Any problems with the compiler options appear after the body of the Prolog section.

IPA considerations: If you specify IPA suboptions that are irrelevant to the IPA compile step, the Prolog does not display them. If IPA processing is not active, IPA suboptions do not appear in the Prolog. The following information describes the optional parts of the listing and the compiler options that generate them.

Source Program

If you specify the SOURCE option, the listing file includes input to the compiler.

Note: If you specify the SHOWINC option, the source listing shows the included text after the #include directives.

Cross-Reference Listing

The XREF option generates a cross-reference table that contains a list of the identifiers from the source program. The table also displays a list of reference, modification, and definition information for each identifier.

The ATTR option generates a cross-reference table that contains a list of the identifiers from the source program, with a list of attributes for each identifier.

If you specify both ATTR and XREF, the cross-reference listing is a composite of the two forms. It contains the list of identifiers, as well as the attribute and reference, modification, and definition information for each identifier. The list is in the form:
identifier : attribute
       n:m (x)
 
where:
n
corresponds to the file number from the INCLUDE LIST. If the identifier is from the main program, n is 0.
m
corresponds to the line number in the file n.
x
is the cross-reference code. It takes one of the following values:
  • R - referenced
  • D - defined
  • M - modified
together with the line numbers in which they appear.

Includes section

The compiler generates the Includes section when you use include files, and specify the options SOURCE, LIST, or INLRPT.

Messages

If the preprocessor or the compiler detects an error, or the possibility of an error, it generates messages. If you specify the SOURCE compiler option, preprocessor error messages appear immediately after the source statement in error. You can generate your own messages in the preprocessing stage by using #error. For information on #error, see the z/OS XL C/C++ Language Reference.

If you specify the compiler options FLAG(I), CHECKOUT or INFO(), the compiler will generate informational diagnostic messages.

For a description of compiler messages, see z/OS XL C/C++ Messages.

Message Summary

This listing section displays the total number of messages and the number of messages for each severity level.

Inline Report

If the OPTIMIZE and INLRPT options are specified, an Inline Report will be included in the listing. This report contains an inline summary and a detailed call structure.

Note: No report is produced when your source file contains only one defined subprogram.
The summary contains information such as:
  • Names of defined subprograms. Subprograms that are inlined by low level optimization are not included in the Inline Report.
  • Reason for action on a subprogram:
    • The P indicates that #pragma noinline and the COMPACT compiler option are not in effect.
    • The F indicates that the subprogram was declared inline, either by #pragma inline for C or the inline keyword for C++.
    • The C indicates that the COMPACT compiler option is specified for #pragma_override(FuncName,"OPT(COMPACT,yes)" is specified in the source code.
    • The M indicates that C++ routine is an inline member routine.
    • The A indicates automatic inlining acted on the subprogram.
    • The - indicates there was no reason to inline the subprogram.
  • Action on a subprogram:
    • Subprogram was inlined at least once.
    • Subprogram was not inlined because of initial size constraints.
    • Subprogram was not inlined because of expansion beyond size constraint.
    • Subprogram was a candidate for inlining, but was not inlined.
    • Subprogram was a candidate for inlining, but was not referenced.
    • This subprogram is directly recursive, or some calls have mismatching parameters
    Note: The "Called" and "Calls" in the actions section of the inline report, indicate how many times a function has been called or has called other functions, despite whether or not the callers or callees have been inlined.
  • Status of original subprogram after inlining:
    • Subprogram is discarded because it is no longer referenced and is defined as static internal.
    • Subprogram was not discarded for various reasons :
      • Subprogram is external. (It can be called from outside the compilation unit.)
      • Some call to this subprogram remains.
      • Subprogram has its address taken.
  • Initial relative size of subprogram (in Abstract Code Units (ACU)).
  • Final relative size of subprogram (in ACUs) after inlining.
  • Number of calls within the subprogram and the number of these calls that were inlined into the subprogram.
  • Number of times the subprogram is called by others in the compile unit and the number of times this subprogram was inlined.
  • Mode that is selected and the value of threshold and limit specified for this compilation.
The detailed call structure contains specific information of each subprogram such as:
  • What subprograms it calls
  • What subprograms call it
  • In which subprograms it is inlined.
The information can help you to better analyze your program if you want to use the inliner in selective mode.

There may be additional messages as a result of the inlining. For example, if inlining a subprogram with automatic storage increases the automatic storage of the subprogram it is being inlined into by more than 4K, a message is emitted.

Pseudo Assembly Listing

The LIST compiler option generates a listing of the machine instructions in the object module in a form similar to assembler language.

This Pseudo Assembly listing displays the source statement line numbers and the line number of any inlined code to aid you in debugging inlined code.

External Symbol Dictionary

The LIST compiler option generates the External Symbol Dictionary. The External Symbol Dictionary lists the names that the compiler generates for the output object module. It includes address information and size information about each symbol.

External Symbol Cross-Reference

The ATTR or XREF compiler options generate the External Symbol Cross Reference section. It shows the original name and corresponding mangled name for each symbol. For additional information on mangled names, see Filter utility.

Storage Offset Listing

If you specify the XREF option, the listing file includes offset information on identifiers.

Static Map

Static Map displays the contents of the @STATIC data area, which holds the file scope read/write static variables. It displays the offset (as a hexadecimal number), the length (as a hexadecimal number), and the names of the objects mapped to @STATIC. Under certain circumstances, the compiler may decide to map other objects to @STATIC.

If you specify the ATTR or XREF option, the listing file includes offset information for file scope read/write static variables.