background image
<< How Code Coverage Works | Coverage Levels >>
<< How Code Coverage Works | Coverage Levels >>

Hit Count Mode

Runtime Analysis
You can change the information mode used by Code Coverage in the Coverage Type
settings. There are three information modes:
·
Default mode
·
Compact mode
·
Hit Count mode
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.
Coverage Types
The Code Coverage feature provides the capability of reporting of various source
code units and branches, depending on the coverage type selected.
By default, Code Coverage implements full coverage analysis, meaning that all
coverage types are instrumented by source code insertion (SCI). However, in some
cases, you might want to reduce the scope of the Code Coverage report, such as to
reduce the overhead generated by SCI for example.
Branches
27