There are also certain
If flow.data does not exist, the program creates it. If flow.data exists, the program updates the profile data.
As an example, suppose you have an instrumented program named prog.inst, and two representative input data files named input_file1 and input_file2. Then the following lines create a flow.data file:
$ prog.inst < input_file1 $ ls flow.data
flow.data
$ prog.inst < input_file2
The flow.data file includes profile data from both input files. To save the profile data to a file other than flow.data in the current working directory, use the FLOW_DATA environment variable as described in Specifying a Different flow.data with FLOW_DATA .
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
program: Can't update counters. Profile data exists
but does not correspond to this executable. Exit.
You can fix this problem in any one of the following 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
Sharing the flow.data File Among Multiple Processes
Aflow.data file can potentially be accessed by several processes at the same time. For example, this can happen when you run more than one instrumented program at the same time in the same directory, or when profiling one program while linking another with
Linker Optimizations 209