Rational Developer for AIX and Linux Performance Advisor
supports analysis of C/C++ programs built with both the IBM XL C/C++
compilers and the GNU gcc/g++ compilers, depending on your operating
system, and the IBM COBOL for AIX compiler for COBOL programs. See
the Installation Guide for detailed information on supported versions.
While multiple versions of both toolchains are supported, there
are minor functional differences among compilers:
- XL C/C++ V11.1 and newer compilers support generation of compiler
transformation reports, a type of listing that is used to provide
detailed information about inlining in the Performance
Source Viewer. Inlining information is shown only
for XL C/C++ V11.1 and newer, and only if the -qlistfmt=xml=all option
is used when compiling.
- Recommendations may be different for different toolchains (or
even for different versions of the compilers in the same toolchain).
For example, a recommendation may suggest rebuilding your application
with compiler options that are specific to the version of the compiler
you are using.
- Line data displayed in the Performance
Source Viewer may be affected by the compiler.
Line debug information generated by the compiler is used to attribute
time to source lines, and different compilers may generate slightly
different line debug information.
Recommended Compiler Options
There will
usually be some performance information provided regardless of how
your application was compiled, but using the recommended compiler
options will allow more in-depth analysis.
See also Best Practices for Setting Build Configuration Options for
general recommendations not specific to Performance Advisor.
- -g (all compilers) or -qlinedebug (XL
C/C++ only) or TEST option (COBOL for AIX only)
- This option tells the compiler to generate debug information that
is used to map profiled code back to your source. Note that this option
should be used in addition to any optimization options (eg. -O2)
not instead of them. Also ensure that debug information is not stripped,
either with the -s option when your program is
linked, or by running the strip command on your
program. If you are using IBM XL C/C++, using -qlinedebug will
produce executables that are smaller than -g but
still have all the needed debug information. For XLC version 12 compilers
the -g8 option can optionally be used instead of -g to produce better
quality line debug information, at the tradeoff of a small additional
performance overhead.
- -qlistfmt=xml=all (XL C/C++ V11.1 or newer
only)
- This option will generate special listing files called compiler
transformation reports that provide more detailed information about
how XL C/C++ compiled your program. This information is currently
used to provide better compiler option recommendations and inlining
information in the Performance
Source Viewer.
IBM XL C/C++ Compiler Documentation
For
documentation on IBM XL C/C++ compilers, please refer to the following:
IBM COBOL for AIX Documentation
For documentation
on the IBM COBOL for AIX compiler, please refer to the following:
- The fully searchable information center of AIX
compiler documentation
- IBM XL C/C++ compiler documentation in PDF format, white papers,
IBM Redbooks publications and links to other IBM compiler documentation: