Code Coverage Tool Reference Manual
Introduction to the HP Code Coverage Tool
HP Code Coverage Tool Reference Manual for HP Integrity NonStop NS-Series Servers—542684-004
1-2
Required Hardware and Software
Required Hardware and Software
The Code Coverage Tool includes two products
T0746: Code Cover Utility (codecov)
T0747: Profile Merge Utility (profmrg)
and support for code-coverage instrumentation in H06.07 and later versions of the
following compilers:
T0356: COBOL compiler (ECOBOL)
T0549: C/C++ compiler for Guardian (CCOMP, CPPCOMP)
T8164: C/C++ compiler for OSS (c89)
T0561: pTAL compiler (EpTAL)
T1246: Compiler backend
The codecov and profmrg products and compatible compilers are provided on the site
update tape (SUT). To use codecov and profmrg, you must first install them on a
Windows workstation, as described in Section 2, Installing the Code Coverage Tool.
Usage Overview
To measure code coverage for an application:
1. Compile application components on the NonStop server or a workstation. For parts
of the application that you wish to instrument for code coverage, use compiler
options described in Section 3, Building the Application.
The compiler generates an instrumented binary file and a static profiling
information (SPI) file.
2. Run the instrumented application on the NonStop server.
The instrumented application creates a raw data file. Each time you run the
instrumented application, a unique raw data file is created, either in the current
directory for an OSS application or in the current subvolume for a Guardian
application.
3. Run profmrg on a Windows workstation to merge all the raw data files into one
dynamic profiling information (DPI) file.
The profmrg utility consolidates all runs and therefore all raw data pertaining to
code coverage for the application. It creates the DPI file, required as input to
codecov.
4. Run codecov on a Windows workstation to produce the code-coverage report.
The codecov utility uses the SPI file, the DPI file, and the original source files to
create a report that you can view with any HTML browser.










