Code Coverage Tool Reference Manual
HP Code Coverage Tool Reference Manual for HP Integrity NonStop NS-Series Servers—542684-004
9-1
9 Usage Considerations
This section summarizes usage considerations for the Code Coverage Tool. Most of
these issues are discussed in other sections of this manual but are repeated here for
your convenience.
Compilation Issues
To support code coverage analysis, you must recompile existing program files or DLLs
with the appropriate compiler and linker options, described in Section 3, Building the
Application. When a source file changes, the code coverage information for that source
file is incorrect until you recompile that source file with the code coverage compiler
options and repeat the later steps to generate code coverage information.
An instrumented program file or DLL has the following characteristics:
Some code optimizations--for example, partial redundancy elimination, function
inlining, and loop unrolling--are limited or disabled.
Instrumented code can be much larger than noninstrumented code.
The maximum supported size for an object file has not increased. Thus, a very
large program file, compiled with instrumentation, could exceed the supported
object size.
The maximum supported data area for an object file has not increased.
Instrumenting a program file or DLL adds counters to the data area. The total size
of data for these counters is proportional to the size (number of functions and basic
blocks) in the instrumented code. Thus, a program file that already uses a large
data area could, when compiled with instrumentation, exceed the maximum
supported data area.
Dynamically unloading an instrumented DLL is not supported.
Code coverage analysis is not available for source code that is textually included
within the body of a function. This limitation exists for all languages, but this style of
source inclusion is commonly used only in COBOL programs.
Compiling an application to produce an instrumented object file can take longer
than a conventional compilation.
Application Performance
The code coverage tool is intended for data generation and collection in a test
environment only. The use of instrumented code is not recommended for production
environments. Applications compiled with the code coverage instrumentation will run
much more slowly than noninstrumented code.










