Code Coverage Tool Reference Manual
HP Code Coverage Tool Reference Manual for HP Integrity NonStop NS-Series Servers—542684-004
3-1
3 Building the Application
Task Overview
The first step in measuring code coverage is to generate instrumented object files for
all parts of the application that you want to measure. To do this, you must compile and
link the source files, specifying compiler and possibly linker options to support code
coverage analysis. In addition to instrumented object files, the compiler creates SPI
files (which you will later combine) for subsequent input to the codecov utility.
Prepare to Compile
Selecting Source Files
Locate all the files you want to instrument. Some reasons you might want to measure
only a subset of the application are that
You have already studied some components and now want to study others. For
example, you might want to study components recently added to the application.
The application is large and you want to economize on data space and other
resources.
Only certain source files belong to you.
You can instrument source files written in different languages and compiled on different
platforms as part of the same application.
Figure 3-1. Compiling the Application to Generate Instrumented Object Files
vst003.vsd
Source Files pTAL, COBOL, C/C++
Compiler
Instrumented Object
Files
Static Profiling
Information (SPI)
Files










