Preparing an Application for Profiling

AMD CodeAnalyst uses debug information produced by a compiler. Debug information is not required for CodeAnalyst profiling, but it is required for CodeAnalyst simulation. Performance data can be collected for an application program that was compiled without debug information, but the results displayed by CodeAnalyst are less descriptive. For example, CodeAnalyst will not be able to display function names or source code. (Assembly code is displayed instead.) When compiling an application in release mode, the developer can still produce the debug information so that AMD CodeAnalyst can perform its analysis.

Compiling with the GNU GCC Compiler

When using GNU GCC to compile the application in general, specify the option -g to produce debugging information. Please refer to section "Options for Debugging Your Program or GCC" of the gcc Linux® manual page (man gcc) for more detail.

Compiling the Example Program from the Tutorial

In order to prepare the example program from the tutorial,

  1. Go to directory /Path_to_CodeAnalyst_source_directory/samples/classic/.
  2. At command prompt, run
    g++ -g -o classic classic.cpp
    This should compile classic.cpp into classic binary with debugging information.

Performing the Analysis

Once classic is built, run and analyze the program using AMD CodeAnalyst by following the steps in the Tutorial. The tutorial uses the Linux-based classic application. The program performs classic, textbook matrix multiplication and is a good CPU and memory intensive example for analysis.