Instrumenting and Compiling the Source Code

Command Line Interface

The runtime analysis tools (Memory Profiling, Performance Profiling, Code Coverage and Runtime Tracing) as well as Component Testing for C++ Contract Check all use SCI instrumentation technology to insert analysis and SCI dump routines into your source code.

Requirements

Before compiling an SCI-instrumented source file, you must make sure that:

  • A working C, Ada or C++ compiler is installed on your system

  • If you use Component Testing for C++, you have prepared a valid options.h file

  • If you compile on a target different from the host where the generated file has been produced, the instrumented file must have been produced using option -NOPATH, and the sub-directory lib of the selected Target Deployment Port directory must be copied onto the target.

There are two alternatives to instrument and compile your source code:

  • Using the Instrumentation Launcher in your standard makefile

  • Using the Instrumentor and Compiler separately.

Instrumentation Launcher

The Instrumentation Launcher replaces your actual compiler command in your makefiles. This launcher transparently takes care of source code preprocessing, instrumentation and compiling.

See the reference section:

Instrumentation and Compilation

Alternatively, you can use the actual Instrumentor command line tools to instrument the source files.

See the reference section:

If you are compiling on a different target, you must copy the TDP /lib directory over to that target.

Add to the include search path the /lib sub-directory that you have copied onto the target. In C and C++, use the -I compiler option.

After this, simply compile the instrumented source file with your compiler.