profil(2)
_________________________________________________________________
profil System Call
Set up execution time profiling for this process.
_________________________________________________________________
SYNTAX
void profil (buff, bufsiz, offset, scale)
char * buff;
int bufsiz;
int offset;
int scale;
PARAMETERS
buff A pointer to an array of bytes, which is the
profiling buffer.
bufsiz The number of bytes in the profiling buffer.
offset The offset by which the profiling program counter
(PC) is adjusted before being multiplied by the
scale.
scale A fraction by which the PC is multiplied before
indexing into the buffer array.
DESCRIPTION
<Buff> points to an area of the users address space whose length
in bytes is given by <bufsiz>. After this call, the user's
program counter (PC) is examined each clock tick. The value of
<offset> is subtracted from the PC, and the remainder multiplied
by <scale>. If the resulting number corresponds to an entry in
<buff>, that entry is incremented. An entry is defined as a
series of bytes with length sizeof(short).
<Scale> is interpreted as an unsigned, fixed-point fraction with
a binary point at the left: 0177777 (octal) gives a 1-1 mapping
of PC's to entries in <buff>; 077777 (octal) maps each pair of
instruction entries together; 02 (octal) maps all instructions
onto the beginning of <buff> producing a non-interrupting core
clock.
Profiling is turned off by giving a <scale> of 0 or 1. It is
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
profil(2)
rendered ineffective by giving a <bufsiz> of 0. Profiling is
turned off when an exec is executed, but remains on in both child
and parent after a fork. Profiling will be turned off if an
update in <buff> would cause a memory fault.
RETURN VALUE
None.
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)