1PROFIL(3)                  Linux Programmer's Manual                 PROFIL(3)
2
3
4

NAME

6       profil - execution time profile
7

SYNOPSIS

9       #include <unistd.h>
10
11       int profil(u_short *buf, size_t bufsiz, size_t offset, u_int scale);
12

DESCRIPTION

14       This  routine  provides  a means to find out in what areas your program
15       spends most of its time. The argument buf points  to  bufsiz  bytes  of
16       core.   Every  virtual 10 milliseconds, the user's program counter (PC)
17       is examined: offset is subtracted and the result is multiplied by scale
18       and divided by 65536.  If the resulting value is less than bufsiz, then
19       the corresponding entry in buf is incremented.  If buf is NULL, profil‐
20       ing is disabled.
21

RETURN VALUE

23       Zero is always returned.
24

BUGS

26       profil()  cannot  be  used  on  a  program  that  also uses ITIMER_PROF
27       itimers.
28
29       True kernel profiling provides more accurate results.   Libc  4.4  con‐
30       tained a kernel patch providing a system call profil.
31

CONFORMING TO

33       Similar to a call in SVr4 (but not POSIX.1-2001).
34

SEE ALSO

36       gprof(1), setitimer(2), sigaction(2), signal(2)
37
38
39
40Linux 2.0                         1993-07-23                         PROFIL(3)
Impressum