Code Profiling Utilities Manual
Optimizing a Program Using Profile-Guided
Optimization
HP Code Profiling Utilities Manual—542684-003
6-2
Location of Source Files
Location of Source Files
The DPI files input to the compilers contain the names of the source files that were
compiled with profgen. By default, these are fully qualified source file names, following
naming conventions for the respective host environments (Guardian, OSS, or
Windows). When you compile with the profuse option, the compiler expects to find the
files in the same location as they were when compiled with the profgen option. If you
have moved these files to a different location after compiling with profgen, the compiler
will be unable to find them when compiling with profuse. However, the compilers
provide an option that makes it possible for these files to be in different locations.
Using the basename Option
The basename compiler option makes it possible for source files compiled with the
profuse option to be in different locations than they were when compiled with the
profgen option. In particular, the source files can be in different environments
(Guardian, OSS, or Windows) for profgen and profuse compilations.
The basename option is summarized in Table 6-2.
If you specify the basename option on the compiler command line, then, when the
process is executed, only the base part of the fully qualified source file path name (the
file name) will be included in the raw data file. For example, assume the following OSS
command line:
c89 /homedir/subdir1/myprog.c -Wprofgen -Wbasename
Table 6-2. basename Option
Option Name
Supported
Environment Compiler Description
BASENAME Guardian CCOMP
CPPCOMP
EPTAL
Include only the base part of the fully-
qualified source file name in the raw
data file created during process
execution.
-Wbasename OSS, Windows c89, c99 Include only the base part of the fully-
qualified source file name in the raw
data file created during process
execution.
-basename Windows eptal Include only the base part of the fully-
qualified source file name in the raw
data file created during process
execution.










