profil(2) DG/UX 4.30 profil(2)
NAME
profil - Set up execution time profiling for this process.
SYNOPSIS
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 scale.
scale A value by which the PC is multiplied before
indexing into the buffer array.
DESCRIPTION
Buff points to an area of the user's address space whose
length in bytes is given by bufsiz. After this call, the
user's program counter (PC) is examined at each clock tick.
The value of offset is subtracted from the PC, and the
result is 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 equal
to sizeof(short).
Scale is interpreted as an unsigned, fixed-point number
with the binary point 16 bits from the right. For a machine
whose instructions are 32 bits in size, such as the MC88000,
0x8000 gives a 1-1 mapping of instructions to entries in
buff; 0x4000 maps each pair of instructions together, etc.
Profiling is turned off by giving a scale of 0 or 1. It is
rendered ineffective by giving a bufsiz of 0. Profiling is
turned off when you call exec(2) but remains on in both the
child and parent after a call to fork(2). Profiling will be
turned off if an update in buff would cause a memory fault.
RETURN VALUE
None.
EXCEPTIONS
None.
Licensed material--property of copyright holder(s) Page 1