PROFIL
Section: Linux Programmer's Manual (2)
Updated: 23 July 1993
Index
Return to Main Contents
NAME
profil - execution time profile
SYNOPSIS
#include <unistd.h>
int profil(char *buf, int bufsiz, int offset, int scale);
DESCRIPTION
Under Linux 0.99.11,
profil
is not implemented in the kernel. Instead, the DLL 4.4.1 libraries provide
a user-space implementation.
Buf
points to
bufsiz
bytes of core. Every virtual 10 milliseconds, the user's program counter (PC)
is examined:
offset
is subtracted and the result is multiplied by
scale.
If this address is in
buf,
then the word pointed to is incremented.
If
scale
is less than 2 or
bufsiz
is zero, profiling is disabled.
RETURN VALUE
Zero is always returned.
BUGS
profil
cannot be used on a program that also uses
ITIMER_PROF
itimers.
Calling
profil
with an invalid
buf
will result in a core dump.
True kernel profiling provides more accurate results.
SEE ALSO
gprof(1), setitimer(2), signal(2), sigaction(2)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- BUGS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 12:24:55 GMT, March 22, 2025