monitor \*- prepare execution profile
monitor(lowpc, highpc, buffer, bufsize)
int lowpc( ), highpc( ), buffer[ ], bufsize;
is an interface to the system's profile entry (II).
are the names of two functions;
is the address of a (user supplied)
arranges for the system to sample the user's
program counter periodically
and record the execution histogram in
The lowest address sampled
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(2, &etext, buf, bufsize);
is a loader-defined symbol which lies just above all the
To stop execution monitoring and write the results
on the file \fBmon.out\fR.
Then, when the program exits, prof (I) can be used