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

The PROFOPTS environment variable

The environment variable PROFOPTS provides run-time control over profiling. When the profiled program is about to terminate execution, it examines the value of PROFOPTS to determine how the profiling data are to be handled.

The PROFOPTS environment variable is a comma-separated list of options interpreted by the program being profiled. If PROFOPTS is not defined in the environment, then the default action is taken: the profiling data is saved in prog.cnt in the current directory. If PROFOPTS is set to the null string, no profiling data is produced.

The following options can be specified in PROFOPTS. They are explained in more detail in the section ``Examples of Using PROFOPTS'' below.


msg=y|n
If msg=y is specified, print a message to stderr stating that profiling data is being created. If msg=n is specified, print only profiling error messages. The default is msg=y.

merge=y|n
If merge=n is specified, do not merge data files after successive runs; the data file will be overwritten after each execution. If merge=y is specified, the data will be merged. The merge will fail if the program has been recompiled between runs; the data file associated with the second run will be stored in TMPDIR. The default is merge=n.

pid=y|n
If pid=y is specified, the name of the data file will include the process ID of the profiled program. This allows the creation of different data files for programs calling fork(2). If pid=n is specified, the default name is used. The default is pid=n.

dir=dir
Store the data file in the directory dir. Otherwise the data file is created in the directory that is current at the end of execution.

file=file
Use file as the name of the data file. Otherwise the default name is used. (See ``Profiling within a Shell Script'' for an example.)

Next topic: Examples of using PROFOPTS
Previous topic: Running the -ql profiled program

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