Code Profiling Utilities Manual
HP Code Profiling Utilities Manual—542684-003
6-1
6
Optimizing a Program Using Profile-
Guided Optimization
To optimize your application using profile-guided optimization, you simply recompile the
application components, specifying, as input to the compiler, the DPI file described in
Section 5, Converting Raw Data Files to DPI Files, and the source programs you want
to optimize. The compiler interprets information in the DPI file to create an optimized
object file.
profuse Option
The profuse option directs the compiler to generate optimized object code based on
information in a DPI file. The profuse option optionally specifies the pathname of the
DPI file. Tab l e 6 -1 summarizes the profuse option.
If you specify the profuse option on the compiler command line, you must also specify
the option to compile at optimization level 2; otherwise, the profuse option is ignored.
You cannot specify the profuse and profgen options on the same command line. To do
so results in an error. These two activities (generating the instrumented object file and
compiling for profile-guided optimization) must occur in separate compilations.
The profuse option can optionally specify the file path of a DPI file. If a file path is not
specified, the compiler looks for the file in the current working directory or default
subvolume, and the file name defaults to:
•
pgodpi if the compilation is done in the Guardian environment, or in the OSS
environment and the current working directory is a Guardian subvolume.
•
pgopti.dpi if the compilation is done in the Windows environment, or in the OSS
environment and the current working directory is an OSS directory.
Note. Profile-guided optimization is supported for C/C++ and pTAL programs only. It is not
supported for COBOL programs.
Table 6-1. profuse Option
Option Name Supported Environment Compiler
PROFUSE
PROFUSE "
Guardian-
filename"
Guardian CCOMP
CPPCOMP
EPTAL
-Wprofuse
-Wprofuse=
filename
OSS, Windows c89, c99
-profuse
-profuse=
pathname
Windows eptal










