Kenwood HP 9000 Personal Computer User Manual


 
Chapter 8 281
Ways to Improve Performance
Profile-Based Optimization
Storing Profile Information for Multiple Programs
A single flow.data file can store information for multiple programs.
This allows an instrumented program to spawn other instrumented
programs, all of which share the same flow.data file.
To allow multiple programs to save their data in the same flow.data
file, a program's profile data is uniquely identified by the executable's
basename (see basename(1)), the executable's file size, and the time the
executable was last modified.
Instead of using the executable's basename, you can specify a basename
by setting the environment variable PBO_PGM_PATH. This is useful when
a number of programs are actually linked to the same instrumented
executables.
For example, consider profiling the ls, lsf and lsx commands. (lsx is
ls with the -x option and lsf is ls with the -F option.) Since the three
commands could be linked to the same instrumented executables, the
developer might want to collect profile data under a single basename by
setting PBO_PGM_PATH=ls. If PBO_PGM_PATH=ls were not set, profile
data would be saved under the ls, the lsf, and the lsx basenames.
When an instrumented program begins execution, it checks whether the
basename, size, and time-stamp match those in the existing flow.data
file. If the basename matches but the size or time-stamp does not match,
that probably means that the program has been relinked since it last
created profile data. In this case, the following error message will be
issued:
program: Can't update counters. Profile data exists
but does not correspond to this executable. Exit.
You can fix this problem any one of these ways:
Remove or rename the existing flow.data file.
Run the instrumented program in a different working directory.
Set the FLOW_DATA environment variable so that profile data is
written to a file other than flow.data.
Rename the instrumented program.