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

Running the -ql profiled program

When you execute a profiled program a data file is produced with the default name of prog.cnt where prog is the name of the profiled program.

Using the above example, invoking the profiled program

$ travel

causes run-time data to be written to the data file travel.cnt in your current directory and the following message is printed to stderr:

INFO: Dumping profiling data from process `travel' . . .
INFO: CNTFILE `travel.cnt' created

To specify a name other than prog.cnt or write data files to a directory other than the current directory, the PROFOPTS environment, described in the next section, can be used.

You can obtain a more representative sample of a program's dynamic behavior by running it more than once, then invoking lprof with its merging options to obtain sums of the execution counts for the multiple runs. You can do the same thing by setting the environment variable PROFOPTS to its merging option before you run the program. See ``Invoking lprof'' and ``Profiling archive or shared object library code with lprof'' for details.


Next topic: The PROFOPTS environment variable
Previous topic: Compiling the program for use with lprof

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004