.TH prof "" "" Command
.PC "Print execution profile of a C program"
\fBprof [ \-abcs ][ \fIprogfile \fB[ \fImonfile \fB] ]\fR
.PP
.HS
.SH Options:
.IC \fB\-a\fR
Use all symbols, not just externals
.IC \fB\-b\fR
Print all bin information
.IC \fB\-c\fR
Print all call information
.IC \fB\-s\fR
Report stack usage high water mark
.Pp
The default \fIprogfile\fR is \fBa.out\fR.
The default \fImonfile\fR is \fBmon.out\fR.
.HE
.B prof
interprets the profile file produced by an execution of a C program and
reports the execution frequencies of each routine.
It also reports the percentage of execution time spent in each routine.
.PP
.B prof
normally reports times and frequencies spent for
regions of programs between externally defined names.
.I progfile
is the executable program; if omitted,
.B a.out
is assumed.
.I monfile
is the monitor file produced during execution of the program; if omitted,
.B mon.out
is assumed.
.PP
To produce
.BR mon.out ,
a program must be compiled with the
.B \-VPROF
option to
.BR cc .
To profile all modules, each module must be compiled with this option.
.PP
The following options are available.
.RS
.IP \fB\-a\fR 0.3i
Profile all symbols, not just externals.
.IP \fB\-b\fR
Print all bin information.
.IP \fB\-c\fR
Print all call information.
.IP \fB\-s\fR
Report stack usage high-water mark.
.RE
.SH Files
\fBa.out\fR \(em Program file (with name list intact)
.br
\fBmon.out\fR \(em Raw execution profile
.SH "See Also
.Xr "cc," cc
.Xr "commands," commands
.Xr "ld," ld
.Xr "nm" nm
