The Preprocessor ctc

Measuring code coverage or timing of a program takes place with an instrumented version of the program. The instrumentation is done with the preprocessor ctc.

The user can decide which source files of the program are instrumented. If the program consists of some object or library files the source code is not available for, these parts of the program cannot be instrumented.

With default settings, ctc does not instrument code coming from included header files. Many system headers contain lots of small inline functions of which you hardly are interested. But if you want to measure code coverage for some of your application headers, this can be configured.

Quite often, you do not use ctc directly, but ctcwrap or ctclaunch for example, or some Testwell CTC++ IDE integration. But ctc is always used for actually instrumenting the source code. Hence it is useful to understand the concepts of ctc.