Penguin
Annotated edit history of profil(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PROFIL
2 !!!PROFIL
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 BUGS
8 CONFORMING TO
9 SEE ALSO
10 ----
11 !!NAME
12
13
14 profil - execution time profile
15 !!SYNOPSIS
16
17
18 __#include __
19
20
21 __int profil(u_short *__''buf''__, size_t__
22 ''bufsiz''__, size_t__ ''offset''__, u_int__
23 ''scale''__);__
24 !!DESCRIPTION
25
26
27 This routine provides a means to find out in what areas your
28 program spends most of its time. The argument ''buf''
29 points to ''bufsiz'' bytes of core. Every virtual 10
30 milliseconds, the user's program counter (PC) is examined:
31 ''offset'' is subtracted and the result is multiplied by
32 ''scale'' and divided by 65536. If the resulting value is
33 less than ''bufsiz'', then the corresponding entry in
34 ''buf'' is incremented. If ''buf'' is NULL, profiling
35 is disabled.
36 !!RETURN VALUE
37
38
39 Zero is always returned.
40 !!BUGS
41
42
43 __profil__ cannot be used on a program that also uses
44 __ITIMER_PROF__ itimers.
45
46
47 True kernel profiling provides more accurate results. Libc
48 4.4 contained a kernel patch providing a system call
49 profil.
50 !!CONFORMING TO
51
52
53 Similar to a call in SVr4 (but not POSIX.1).
54 !!SEE ALSO
55
56
57 gprof(1), setitimer(2), signal(2),
58 sigaction(2)
59 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.