prof(1) — Commands
NAME
prof − display profile data
SYNOPSIS
prof [ −alnzs ] [ −low [ −high ] ] [ objfile [ proffile ... ] ]
DESCRIPTION
prof interprets the file produced by the monitor subroutine. In normal operation, prof reads the symbol table in the object file objfile and correlates it with the profile file proffile. prof uses the default files a.out (object file) and mon.out (profile file) if you do not give explicit filenames.
For each external symbol, the percentage 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 you specify more than one profile file, the output represents the sum of the profiles.
In order for the number of calls to a routine to be tallied, the −p option of cc(1) 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
−a Report all symbols rather than only external symbols.
−l Sort output by symbol value.
−n Sort output by number of calls.
−z Print routines which have zero usage (as indicated by call counts and accumulated time).
−s Produce a summary of profile file in mon.sum.
FILES
mon.outfor profile
a.outfor namelist
BUGS
Beware of quantization errors.