Compiler versions and options

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:

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:


Feedback