DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Analyzing run-time behavior

Merged data

You can merge existing data files with the lprof command as follows:

   $ lprof -d destfile -m run1.cnt run2.cnt run3.cnt
where 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


NOTE: Use the -T option with care. If the control flow of the recompiled program has changed, the merged data file is very likely to be erroneous; lprof will produce an incorrect report.


Next topic: Profiling archive or shared object library code with lprof
Previous topic: Example of lprof -s Output

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005