BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / prof.0
PROF(1) UNIX Programmer's Manual PROF(1)
N\bNA\bAM\bME\bE
prof - display profile data
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
p\bpr\bro\bof\bf [ -\b-a\ba ] [ -\b-l\bl ] [ -\b-n\bn ] [ -\b-z\bz ] [ -\b-s\bs ] [ -\b-v\bv [ -\b-_\bl_\bo_\bw [ -\b-_\bh_\bi_\bg_\bh
] ] ] [ a.out [ mon.out ... ] ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bP_\br_\bo_\bf interprets the file produced by the _\bm_\bo_\bn_\bi_\bt_\bo_\br subroutine.
Under default modes, the symbol table in the named object
file (_\ba._\bo_\bu_\bt default) is read and correlated with the profile
file (_\bm_\bo_\bn._\bo_\bu_\bt default). For each external symbol, the per-
centage of time spent executing between that symbol and the
next is printed (in decreasing order), together with the
number of times that routine was called and the number of
milliseconds per call. If more than one profile file is
specified, the output represents the sum of the profiles.
In order for the number of calls to a routine to be tallied,
the -\b-p\bp option of _\bc_\bc, _\bf_\b7_\b7 or _\bp_\bc must have been given when the
file containing the routine was compiled. This option also
arranges for the profile file to be produced automatically.
Options are:
-\b-a\ba all symbols are reported rather than just external sym-
bols.
-\b-l\bl the output is sorted by symbol value.
-\b-n\bn the output is sorted by number of calls
-\b-s\bs a summary profile file is produced in _\bm_\bo_\bn._\bs_\bu_\bm. This is
really only useful when more than one profile file is
specified.
-\b-v\bv all printing is suppressed and a graphic version of the
profile is produced on the standard output for display
by the _\bp_\bl_\bo_\bt(1) filters. When plotting, the numbers _\bl_\bo_\bw
and _\bh_\bi_\bg_\bh, by default 0 and 100, may be given to cause a
selected percentage of the profile to be plotted with
accordingly higher resolution.
-\b-z\bz routines which have zero usage (as indicated by call
counts and accumulated time) are nevertheless printed
in the output.
F\bFI\bIL\bLE\bES\bS
mon.out for profile
a.out for namelist
mon.sum for summary profile
Printed 7/9/88 April 29, 1985 1
PROF(1) UNIX Programmer's Manual PROF(1)
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
monitor(3), profil(2), cc(1), plot(1G)
B\bBU\bUG\bGS\bS
Beware of quantization errors.
Is confused by _\bf_\b7_\b7 which puts the entry points at the bottom
of subroutines and functions.
Printed 7/9/88 April 29, 1985 2