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