1PROFIL(2)                     System Calls Manual                    PROFIL(2)
2
3
4

NAME

6       profil - execution time profile
7

SYNOPSIS

9       profil(buff, bufsiz, offset, scale)
10       char *buff;
11       int bufsiz, offset, scale;
12

DESCRIPTION

14       Buff points to an area of core whose length (in bytes) is given by buf‐
15       siz.  After this call, the user's program counter (pc) is examined each
16       clock tick (VAX and TAHOE: 100 ticks/second = 10 milliseconds per tick;
17       60 ticks/second ~= 16 milliseconds per tick); offset is subtracted from
18       it, and the result multiplied by scale.  If the resulting number corre‐
19       sponds to a word inside buff, that word is incremented.
20
21       The scale is interpreted as an unsigned, fixed-point fraction  with  16
22       bits  of fraction: 0xffff gives a 1-1 mapping of pc's to words in buff;
23       0x7fff maps each pair of instruction words together.
24
25       Profiling is turned off by giving a scale of 0 or 1.   It  is  rendered
26       ineffective  by  giving a bufsiz of 0.  Profiling is turned off when an
27       execve is executed, but remains on in child and  parent  both  after  a
28       fork.   Profiling is turned off if an update in buff would cause a mem‐
29       ory fault.
30

RETURN VALUE

32       A 0, indicating success, is always returned.
33

SEE ALSO

35       gprof(1), prof(1), setitimer(2), monitor(3)
36
37
38
393rd Berkeley Distribution         May 6, 1987                        PROFIL(2)
Impressum