BSD 4_2 development
[unix-history] / usr / man / man1 / prof.1
CommitLineData
31341dcc
C
1.TH PROF 1 "18 January 1983"
2.UC 4
3.SH NAME
4prof \- display profile data
5.SH SYNOPSIS
6.B prof
7[
8.B \-a
9] [
10.B \-l
11] [
12.B \-n
13] [
14.B \-z
15] [
16.B \-s
17] [
18.B \-v
19[
20.BI \- "low\fR [ \fB\-\fIhigh\fR ]"
21] ]
22[ a.out
23[ mon.out ... ] ]
24.SH DESCRIPTION
25.I Prof
26interprets the file
27produced by the
28.I monitor
29subroutine.
30Under default modes,
31the symbol table in the
32named object file
33.I (a.out
34default)
35is read and correlated with the
36profile file
37.I (mon.out
38default).
39For each external symbol, the percentage
40of time spent executing between that symbol
41and the next
42is printed (in decreasing order),
43together with the number of times that routine was called
44and the number of milliseconds per call.
45If more than one profile file is specified,
46the output represents the sum of the profiles.
47.PP
48In order for the number of calls to a routine to be tallied,
49the
50.B \-p
51option of
52.I cc,
53.I f77
54or
55.I pc
56must have been given when the file containing the
57routine was compiled.
58This option also arranges for the
59profile file to be produced automatically.
60.PP
61Options are:
62.TP
63.B \-a
64all symbols are reported rather than
65just external symbols.
66.TP
67.B \-l
68the output is sorted by symbol value.
69.TP
70.B \-n
71the output is sorted by number of calls
72.TP
73.B \-s
74a summary profile file is produced in
75.I mon.sum.
76This is really only useful
77when more than one profile file is specified.
78.TP
79.B \-v
80all printing is suppressed
81and a graphic version of the profile
82is produced
83on the standard output for display by the
84.IR plot (1)
85filters.
86When plotting, the numbers
87.I low
88and
89.I high,
90by default 0 and 100, may be given to cause a selected
91percentage of the profile to be plotted
92with accordingly higher resolution.
93.TP
94.B \-z
95routines which have zero usage (as indicated by call counts
96and accumulated time) are nevertheless printed in the output.
97.SH FILES
98.ta \w'mon.out 'u
99mon.out for profile
100.br
101a.out for namelist
102.br
103mon.sum for summary profile
104.SH "SEE ALSO"
105monitor(3), profil(2), cc(1), plot(1G)
106.SH BUGS
107Beware of quantization errors.
108.PP
109Is confused by
110.I f77
111which puts the entry points at the bottom of subroutines and functions.