01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PROF ( 1) PROF ( 1)<br />

NAME<br />

prof - display profile data<br />

SYNOPSIS<br />

prof [-tcan] [-ox] [-g] [-z] [-h] [-s] [-m mdata] [prog]<br />

DESCRIPTION<br />

Prof interprets the profile file produced by the monitor(3C) function.<br />

The symbol table in the object file prog (a.out by default)<br />

is read and correlated with the profile file (mon.out by default).<br />

For each external text symbol the percentage of time spent executing<br />

between the address of that symbol and the address of the<br />

next is printed, together with the number of times that function<br />

was called and the average number of milliseconds per call.<br />

The mutually exclusive options t, c, a, and n determine the type<br />

of sorting of the output lines:<br />

-t Sort by decreasing percentage of total time (default).<br />

-c Sort by decreasing number of calls.<br />

-a Sort by increasing symbol address.<br />

-n Sort lexically by symbol name.<br />

The mutually exclusive options o and x specify the printing of<br />

the address of each symbol monitored:<br />

-o Print each symbol address (in octal) along with the symbol<br />

name.<br />

-x Print each symbol address (in hexadecimal) along with the<br />

symbol name.<br />

The following options may be used in any combination:<br />

-g Include non-global symbols (static functions).<br />

-z Include all symbols in the profile range (see monitor(3C)),<br />

even if associated with zero number of calls and zero time.<br />

-h Suppress the heading normally printed on the report.<br />

(This is useful if the report is to be processed further.)<br />

-s Print a summary of several of the monitoring parameters<br />

and statistics on the standard error output.<br />

-m mdata<br />

Use file mdata instead of mon.out for profiling data.<br />

For the number of calls to a function to be tallied, the -p option<br />

of cc(l) must have been given when the file containing the function<br />

was compiled. This option to the cc command also arranges<br />

for the object file to include a special profiling start-up function<br />

that calls monitor(3C) at the beginning and end of execution. It<br />

is the call to monitor at the end of execution that causes the<br />

mon.out file to be written. Thus, only programs that call exit(2)<br />

or return from main will cause the mon.out file to be produced.<br />

FILES<br />

mon.out for profile<br />

a.out for namelist<br />

- 1-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!