Using Command line Runtime Analysis for C or C++

Command Line Interface

The runtime analysis tools for C and C++ include:

  • Memory Profiling

  • Performance Profiling

  • Code Coverage

  • Runtime Tracing

These features use Source Code Insertion (SCI) technology. When analyzing C and C++ code, the easiest way to implement SCI features from the command line is to use the C and C++ Instrumentation Launcher.

The Instrumentation Launcher is designed to fit directly into your compilation sequence; simply add the attolcc command in front of your usual compilation or link command line.

Note The attolcc binary is located in the /cmd directory of the applicable Target Deployment Port.

To perform runtime analysis on C or C++ source code:
  1. First, set up the necessary environment variables. See Setting Environment Variables.
  2. Edit your usual makefile with the following command line:
    attolcc [-options] [--settings] -- <compiler command line>
    Where <compiler command line> is the command that you usually invoke to build your application.
    Examples:

    attolcc -- cc -I../include -o appli appli.c bibli.c -lm

    attolcc -TRACE -- cc -I../include -o appli appli.c bibli.c -lm

  3. After execution of your application, in order to process SCI dump information (i.e. the runtime analysis results), you need to separate the single output file into separate, feature-specific, result files. See Splitting the SCI Dump File.
  4. Finally, launch the Graphical User Interface to view the test reports. See Opening Reports from the Command Line.

Related Topics

Runtime Analysis | Source Code Insertion Technology | C and C++ Instrumentation Launcher - attolcc