1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer <aeb@cwi.nl>
26 .\" (prompted by Bas V. de Bakker <bas@phys.uva.nl>)
27 .\" Corrected (and moved to man3), 980612, aeb
28 .TH PROFIL 3 2007-07-26 "Linux" "Linux Programmer's Manual"
30 profil \- execution time profile
32 .B #include <unistd.h>
34 .BI "int profil(unsigned short *" buf ", size_t " bufsiz \
35 ", size_t " offset ", unsigned int " scale );
38 Feature Test Macro Requirements for glibc (see
39 .BR feature_test_macros (7)):
43 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
45 This routine provides a means to find out in what areas your program
46 spends most of its time.
52 Every virtual 10 milliseconds, the user's program counter (PC)
55 is subtracted and the result is multiplied by
58 If the resulting value is less than
60 then the corresponding entry in
65 is NULL, profiling is disabled.
67 Zero is always returned.
69 Similar to a call in SVr4 (but not POSIX.1-2001).
72 cannot be used on a program that also uses
77 True kernel profiling provides more accurate results.
78 Libc 4.4 contained a kernel patch providing a system call profil.