.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)profil.2 6.2 (Berkeley) %G%
profil \- execution time profile
.B profil(buff, bufsiz, offset, scale)
.B int bufsiz, offset, scale;
points to an area of core whose length (in bytes) is given by
After this call, the user's program counter (pc)
is examined each clock tick (10 milliseconds);
is subtracted from it, and the result multiplied by
If the resulting number corresponds to a word
that word is incremented.
The scale is interpreted as an unsigned,
fixed-point fraction with 16 bits of fraction:
0x10000 gives a 1-1 mapping of pc's to words
0x8000 maps each pair of instruction words
Profiling is turned off by giving a
Profiling is turned off when an
is executed, but remains on in child and parent both
Profiling is turned off if an update in
would cause a memory fault.
A 0, indicating success, is always returned.
gprof(1), setitimer(2), monitor(3)