Commit | Line | Data |
---|---|---|
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 | |
10 | prof \- 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 | |
32 | interprets the file | |
33 | produced by the | |
34 | .I monitor | |
35 | subroutine. | |
36 | Under default modes, | |
37 | the symbol table in the | |
38 | named object file | |
39 | .I (a.out | |
40 | default) | |
41 | is read and correlated with the | |
42 | profile file | |
43 | .I (mon.out | |
44 | default). | |
45 | For each external symbol, the percentage | |
46 | of time spent executing between that symbol | |
47 | and the next | |
48 | is printed (in decreasing order), | |
49 | together with the number of times that routine was called | |
50 | and the number of milliseconds per call. | |
51 | If more than one profile file is specified, | |
52 | the output represents the sum of the profiles. | |
53 | .PP | |
54 | In order for the number of calls to a routine to be tallied, | |
55 | the | |
56 | .B \-p | |
57 | option of | |
58 | .I cc, | |
59 | .I f77 | |
60 | or | |
61 | .I pc | |
62 | must have been given when the file containing the | |
63 | routine was compiled. | |
64 | This option also arranges for the | |
65 | profile file to be produced automatically. | |
66 | .PP | |
67 | Options are: | |
68 | .TP | |
69 | .B \-a | |
70 | all symbols are reported rather than | |
71 | just external symbols. | |
72 | .TP | |
73 | .B \-l | |
74 | the output is sorted by symbol value. | |
75 | .TP | |
76 | .B \-n | |
77 | the output is sorted by number of calls | |
78 | .TP | |
79 | .B \-s | |
80 | a summary profile file is produced in | |
81 | .I mon.sum. | |
82 | This is really only useful | |
83 | when more than one profile file is specified. | |
84 | .TP | |
85 | .B \-v | |
86 | all printing is suppressed | |
87 | and a graphic version of the profile | |
88 | is produced | |
89 | on the standard output for display by the | |
90 | .IR plot (1) | |
91 | filters. | |
92 | When plotting, the numbers | |
93 | .I low | |
94 | and | |
95 | .I high, | |
96 | by default 0 and 100, may be given to cause a selected | |
97 | percentage of the profile to be plotted | |
98 | with accordingly higher resolution. | |
99 | .TP | |
100 | .B \-z | |
101 | routines which have zero usage (as indicated by call counts | |
102 | and accumulated time) are nevertheless printed in the output. | |
103 | .SH FILES | |
104 | .ta \w'mon.out 'u | |
105 | mon.out for profile | |
106 | .br | |
107 | a.out for namelist | |
108 | .br | |
109 | mon.sum for summary profile | |
110 | .SH "SEE ALSO" | |
d953d69b | 111 | monitor(3), profil(2), cc(1), plot(1G) |
788e9789 KM |
112 | .SH BUGS |
113 | Beware of quantization errors. | |
114 | .PP | |
115 | Is confused by | |
116 | .I f77 | |
117 | which puts the entry points at the bottom of subroutines and functions. |