Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ prof(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

nm(1)

exit(2)

profil(2)

monitor(3C)




prof(1) prof(1)
NAME prof - displays profile data SYNOPSIS prof [-a] [-c] [-g] [-h] [-m mdata] [-n] [-o] [-s] [-t] [-x] [-z] [objfile] ARGUMENTS -a Sorts by increasing symbol address. -c Sorts by decreasing number of calls. -g Includes nonglobal symbols (static functions). -h Suppresses the heading normally printed on the report. (This is useful if the report is to be processed further.) -m mdata Uses the file mdata instead of mon.out for profiling data. -n Sorts lexically by symbol name. -o Prints each symbol address (in octal) along with the symbol name. objfile Specifies the object file from which the symbol table is used. -s Prints a summary of several of the monitoring parameters and statistics on the standard error output. -t Sorts by decreasing percentage of total time (default). -x Prints each symbol address (in hexadecimal) along with the symbol name. -z Includes all symbols in the profile range (see monitor(3C)), even if associated with zero number of calls and zero time. DESCRIPTION prof interprets the profile file produced by the monitor(3C) function. The symbol table in the object file objfile (a.out by default) is read and correlated with the profile file (mon.out by default). For each external text symbol the percentage of time spent executing between the address of that symbol and the address of the next is printed, together with the number of times that function was called and the average number of milliseconds per call. January 1992 1



prof(1) prof(1)
For the number of calls to a function to be tallied, the -p option of cc(1) must have been given when the file containing the function was compiled. This option to the cc command also arranges for the object file to include a special profiling start-up function that calls monitor(3C) at the beginning and end of execution. It is the call to monitor at the end of execution that causes the mon.out file to be written. Thus, only programs that call exit(2) or return from main cause the mon.out file to be produced. LIMITATIONS There is a limit of 600 functions that may have call counters established during program execution. If this limit is exceeded, other data is overwritten and the mon.out file is corrupted. The number of call counters used is reported automatically by the prof command whenever the number exceeds 250. FILES /bin/prof Executable file mon.out File used for profile a.out File used for namelist SEE ALSO cc(1), nm(1) exit(2), profil(2), monitor(3C) in A/UX Programmer's Reference 2 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026