|
|
You can merge existing data files with the lprof command as follows:
$ lprof -d destfile -m run1.cnt run2.cnt run3.cntwhere the data file run1.cnt was specified in the PROFOPTS environment variable the first time the program was executed, the data file run2.cnt the second time the program was executed, and so on. The command line requires both -d and -m. The -m option takes the names of two or more data files to be merged. The -d option specifies the destination file that will contain the merged data. The command will fail if the data files were not created by the same program or if the program was recompiled between runs.
You can, however, use the -T option
to merge existing data files of a recompiled program.
Suppose, for example, you have run the profiled program
travel, specifying the data file run1.cnt in the
PROFOPTS environment variable.
Now you recompile travel with -ql
and run it again, this time specifying the data file run2.cnt.
The profiled programs have the same name, travel,
but different time stamps.
Because the time stamps do not match, the data files cannot be
merged unless you override the time stamp check by specifying the -T
option to lprof:
$ lprof -d merged.cnt -m run1.cnt run2.cnt -T