Code Coverage Tool Reference Manual
Building the Application
HP Code Coverage Tool Reference Manual for HP Integrity NonStop NS-Series Servers—542684-004
3-3
Build the Application
Compile the application in a different directory, folder, or subvolume.
Build the Application
Compiling the Source Files
Table 3-1 shows, for each supported platform and compiler, the options you specify to
achieve code coverage.
CODECOV (or codecov) Option
This option directs the compiler to create an instrumented object file and to create or
add to an existing SPI file.
Verify the Output
After compiling your program, verify that a new object file and a new or modified SPI
file exist in the compilation location:
Naming conventions for the instrumented object file are the same as for
uninstrumented object files, so check the timestamp to verify that a new object file
was created in the OSS directory, Windows folder, or Guardian subvolume.
On the NonStop server, the SPI file is a type 180 text file. On OSS or Windows, it
has the extension .spi. Check for a file with the name pgopti.spi in the OSS or
Windows environment, or the name pgospi in the Guardian environment.
Linking the Object Files
To link instrumented object files, you must specify the option -l pgo if invoking the
linker directly. If the linker is invoked through the compiler and you’ve specified the
CODECOV or codecov option, the compiler automatically inserts the -l pgo option.
(EpTAL does not support invoking the linker through the compiler.)
Table 3-1. Compiler Options Related to Code Coverage
Platform Compiler(s)
Option to Generate
Instrumented Object
File and SPI File
Guardian CCOMP,
CPPCOMP,
ECOBOL,
EPTAL
CODECOV
OSS,
Windows
c89, ecobol -Wcodecov
Windows eptal -codecov










