prof(1) prof(1)
NAME
prof - display profile data
SYNOPSIS
prof [-a] [-c] [-g] [-h] [-m mdata] [-n] [-o] [-s] [-t] [-x]
[-z] [prog]
DESCRIPTION
prof interprets the profile file produced by the monitor(3C)
function. The symbol table in the object file prog (a.out
by default) is read and correlated with the profile file
(mon.out by default). For each external text symbol the
percentage of time spent executing between the address of
that symbol and the address of the next is printed, together
with the number of times that function was called and the
average number of milliseconds per call.
The mutually exclusive flag options t, c, a, and n determine
the type of sorting of the output lines:
-t Sort by decreasing percentage of total time (default).
-c Sort by decreasing number of calls.
-a Sort by increasing symbol address.
-n Sort lexically by symbol name.
The mutually exclusive flag options o and x specify the
printing of the address of each symbol monitored:
-o Print each symbol address (in octal) along with the
symbol name.
-x Print each symbol address (in hexadecimal) along with
the symbol name.
The following flag options may be used in any combination:
-g Include non-global symbols (static functions).
-z Include all symbols in the profile range (see
monitor(3C)), even if associated with zero number of
calls and zero time.
-h Suppress the heading normally printed on the report.
(This is useful if the report is to be processed
further.)
-s Print a summary of several of the monitoring parameters
and statistics on the standard error output.
Page 1 (last mod. 1/16/87)
prof(1) prof(1)
-m mdata
Use file mdata instead of mon.out for profiling data.
For the number of calls to a function to be tallied, the -p
flag option of cc(1) must have been given when the file
containing the function was compiled. This flag option to
the cc command also arranges for the object file to include
a special profiling start-up function that calls monitor(3C)
at the beginning and end of execution. It is the call to
monitor at the end of execution that causes the mon.out file
to be written. Thus, only programs that call exit(2) or
return from main cause the mon.out file to be produced.
FILES
/bin/prof
mon.out for profile
a.out for namelist
SEE ALSO
cc(1), nm(1), exit(2), profil(2), monitor(3C).
BUGS
There is a limit of 600 functions that may have call
counters established during program execution. If this
limit is exceeded, other data is overwritten and the mon.out
file is corrupted. The number of call counters used is
reported automatically by the prof command whenever the
number exceeds 250.
Page 2 (last mod. 1/16/87)