*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: monitor | Section: 3 | Source: UNIX v10 | File: monitor.3
MONITOR(3) Library Functions Manual MONITOR(3) NAME monitor - prepare execution profile SYNOPSIS monitor(lowpc, highpc, buffer, bufsize, nfunc) int (*lowpc)(), (*highpc)(); short buffer[]; DESCRIPTION An executable program created by cc -p automatically includes calls for monitor with default parameters; monitor needn't be called explicitly except to gain fine control over profiling. Monitor is an interface to profil(2). Lowpc and highpc are the ad- dresses of two functions; buffer is the address of a (user supplied) array of bufsize bytes. Monitor arranges to record a histogram of pe- riodically sampled values of the program counter, and of counts of calls of certain functions, in the buffer. The lowest address sampled is that of lowpc and the highest is just below highpc. At most nfunc call counts can be kept; only calls of functions compiled with the pro- filing option -p of cc(1) are recorded. For the results to be signifi- cant, especially where there are small, heavily used routines, it is suggested that the buffer be no more than a few times smaller than the range of locations sampled. The default values for bufsize and nfunc are (highpc-lowpc)/8 and 300 respectively. To profile the entire program, use extern etext(); . . . monitor((int (*)())2, etext, buf, bufsize, nfunc); Etext lies just above all the program text, see end(3). For the high- est resolution profiling on the VAX, use bufsize = ((int)highpc)-((int)lowpc)+12+8*nfunc. To stop execution monitoring and write the results on the file mon.out, use monitor((int (*)())0); then prof(1) can be used to examine the results. FILES SEE ALSO prof(1), profil(2), cc(1) MONITOR(3)

Navigation Options