monitor \- prepare execution profile
.B monitor(lowpc, highpc, buffer, bufsize, nfunc)
int (*lowpc)( ), (*highpc)( );
An executable program created by
`cc \-p' automatically includes calls for
needn't be called explicitly
except to gain fine control over profiling.
are the addresses of two functions;
is the address of a (user supplied)
arranges to record a histogram of
periodically sampled values of the program counter,
of certain functions, in the buffer.
The lowest address sampled
call counts can be kept; only calls of functions
compiled with the profiling option
For the results to be significant,
especially where there are small, heavily
it is suggested that the buffer be no more
than a few times smaller than the range
To profile the entire program,
monitor((int)2, etext, buf, bufsize, nfunc);
To stop execution monitoring and write the results
prof(1), profil(2), cc(1)