Code Profiling Utilities Manual
Running the Code Cover Utility
HP Code Profiling Utilities Manual—542684-003
7-3
Preparing the SPI File
Preparing the SPI File
The codecov utility requires a single SPI file. The default name for the SPI file depends
on where the application was compiled:
•
pgopti.spi if the program was compiled on Windows
•
pgopti.spi if the program was compiled in the OSS environment and the current
directory is an OSS directory
•
pgospi if the program was compiled in the Guardian environment
•
pgospi if the program was compiled in the OSS environment and the current
directory is a Guardian subvolume
If you compiled on the NonStop server, you must move the SPI file to the workstation,
since that is where codecov runs. By default, codecov expects the SPI file to have the
name pgopti.spi, so be sure that the file is correctly named after you transfer it from the
NonStop server to the workstation.
You can use the -spi option on the codecov command to specify a different name.
codecov always looks for the SPI file in the current folder; move the file from the
compilation folder to the workstation, renaming it if necessary.
The SPI file is a text file that contains information about the various source files. For
each source file, the file includes information about the functions in that source file.If
your application is compiled in multiple directories or subvolumes and therefore more
than one SPI file exists for it, you must manually concatenate the files into one SPI file
for input to codecov. The codecov utility ignores any duplicate information.
Creating a single SPI file from multiple SPI files is not complex. SPI files are text files,
and all you need to do is concatenate them. However, when a SPI file is created on the
Guardian platform, it is somewhat cumbersome to edit because it is a code 180 file
and, in general, cannot be converted to an edit file, because the lines are too long. For
convenience, move SPI files to the OSS or Windows platform and concatenate them
there.
Preparing the DPI File
Identify the latest DPI file produced as output from profmrg. The default name for the
DPI file is pgopti.dpi if the file was created in the Windows or OSS environment, or
pgodpi if it was created in the Guardian environment. You can use the -dpi option to
specify a different name. The codecov utility always looks for the DPI file in the current
folder.
The DPI file contains the names of source files whose code was actually executed
during the test run. If a given source file name occurs in the SPI file but not the DPI file,
codecov deduces that none of the code in that source file was covered, and the code
coverage report reflects that conclusion. Similarly, if a source file name occurs in the
Note. The SPI file is not used for profile-guided optimization.










