Code Profiling Utilities Manual
Building the Application
HP Code Profiling Utilities Manual—542684-003
3-5
Verify the Output
When code that was generated from separate compilations will later be included in a
single application, you should specify the same raw data file location for all the
compilations.
If you are concurrently compiling multiple applications, you can use the profdir option to
cause the raw data files for each application to be written to a separate directory or
subvolume. That makes it easier to keep track of the raw data files and to ensure that
you merge only the files that apply to a specific application.
profgen Option
This option directs the compiler to create an instrumented object file for use in profile-
guided optimization. The profgen option is summarized in Table 3-4.
When you specify the profgen option, you must also specify the option to compile at
optimization level 2. If you specify profgen and do not also compile at optimization level
2, the profgen option is ignored.
Compiler Optimization Levels
Code coverage is supported for all three optimization levels (0, 1, and 2). Profile-
guided optimization is supported only for optimization level 2.
Verify the Output
After compiling your program, verify that a new object file and, for code coverage
analysis, 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.
Table 3-4. profgen Option
Option Name
Supported
Environment Compiler
PROFGEN Guardian CCOMP
CPPCOMP
EPTAL
-Wprofgen OSS, Windows c89, c99
-profgen Windows eptal










