Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

prof(1) [plan9 man page]

PROF(1) 						      General Commands Manual							   PROF(1)

NAME
prof, kprof - display profiling data SYNOPSIS
prof [ -dr ] [ program ] [ profile ] kprof kernel kpdata DESCRIPTION
Prof interprets files produced automatically by programs loaded using the -p option of 2l(1) or other loader. The symbol table in the named program file by default) is read and correlated with the profile file by default). For each symbol, the percentage of time (in sec- onds) spent executing between that symbol and the next is printed (in decreasing order), together with the time spent there and the number of times that routine was called. Under option -d, prof prints the dynamic call graph of the target program, annotating the calls with the time spent in each routine and those it calls, recursively. The output is indented two spaces for each call, and is formatted as symbol:time/ncall where symbol is the entry point of the call, time is in milliseconds, and ncall is the number of times that entry point was called at that point in the call graph. If ncall is one, the /ncall is elided. Normally recursive calls are compressed to keep the output brief; option -r prints the full call graph. The size of the buffer in program used to hold the profiling data, by default 2000 entries, may be controlled by setting the environment variable profsize before running program. If the buffer fills, subsequent function calls may not be recorded. Kprof is similar to prof, but presents the data accumulated by the kernel profiling device, kprof(3). The symbol table file, that of the operating system kernel, and the data file, typically /dev/kpdata, must be provided. Kprof has no options and cannot present dynamic data. SOURCE
/sys/src/cmd/prof.c /sys/src/cmd/kprof.c SEE ALSO
2l(1), kprof(3) PROF(1)

Check Out this Related Man Page

PROF(1) 						      General Commands Manual							   PROF(1)

NAME
prof - display profile data SYNOPSIS
prof [ -a ] [ -l ] [ -n ] [ -z ] [ -s ] [ -v [ -low [ -high ] ] ] [ a.out [ mon.out ... ] ] DESCRIPTION
Prof interprets the file produced by the monitor subroutine. Under default modes, the symbol table in the named object file (a.out default) is read and correlated with the profile file (mon.out default). 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 more than one profile file is specified, 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, f77 or pc 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 are: -a all symbols are reported rather than just external symbols. -l the output is sorted by symbol value. -n the output is sorted by number of calls -s a summary profile file is produced in mon.sum. This is really only useful when more than one profile file is specified. -v all printing is suppressed and a graphic version of the profile is produced on the standard output for display by the plot(1) fil- ters. When plotting, the numbers low and high, by default 0 and 100, may be given to cause a selected percentage of the profile to be plotted with accordingly higher resolution. -z routines which have zero usage (as indicated by call counts and accumulated time) are nevertheless printed in the output. FILES
mon.out for profile a.out for namelist mon.sum for summary profile SEE ALSO
monitor(3), profil(2), cc(1), plot(1G) BUGS
Beware of quantization errors. Is confused by f77 which puts the entry points at the bottom of subroutines and functions. 4th Berkeley Distribution April 29, 1985 PROF(1)
Man Page