Code Profiling Utilities Manual

Code Profiling Usage Scenarios
HP Code Profiling Utilities Manual542684-003
9-3
Profile-Guided Optimization Example
compiler to generate more efficient code (for example, by using the NO_EXCEPTIONS
compiler option).
Profile-guided optimization is typically used as an additional step in the process shown
in the preceding figure. Once the program has compiled and run at optimization level 2,
follow the steps shown in Figure 9-2 to use profile-guided optimization to produce even
more efficient object code.
Figure 9-2. Profile-Guided Optimization Steps
Recompile with the
profgen option
Run program on
representative
workload to create
raw data file
Use profmrg to
combine raw data files
into DPI file
vst034.vsd
Source program
(compiled and
executed at opt 2)
Measure the
program's
performance
Recompile with
profuse option using
DPI file, and retest
Does program
contain errors?
Debug program
Yes
No