Information Modes

Code Coverage for Ada, Java, C and C++

The Information Mode is the method used by Code Coverage to code the trace output. This has a direct impact of the size of the trace file as well as on CPU overhead.

You can change the information mode used by Code Coverage in the Coverage Type settings. There are three information modes:

Default Mode

When using Default or Pass mode, each branch generates one byte of memory. This offers the best compromise between code size and speed overhead.

Compact Mode

The Compact mode is functionally equivalent to Pass mode, except that each branch needs only one bit of storage instead of one byte. This implies a smaller requirement for data storage in memory, but produces a noticeable increase in code size (shift/bits masks) and execution time.

Hit Count Mode

In Hit Count mode, instead of storing a Boolean value indicating coverage of the branch, a specific count is maintained of the number of times each branch is executed. This information is displayed in the Code Coverage report.

Count totals are given for each branch, for all trace files transferred to the report generator as parameters.

In the Code Coverage report, branches that have never been executed are highlighted with asterisk '*' characters.

The maximum count in the report generator depends on the machine on which tests are executed. If this maximum count is reached, the report signals it with a Maximum reached message.

Related Topics

About Code CoverageSelecting Coverage TypeEstimating Instrumentation OverheadReducing Instrumentation Overhead