1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" 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 2014-07-08 "Linux" "Linux Programmer's Manual"
30 profil \- execution time profile
33 .B #include <unistd.h>
35 .BI "int profil(unsigned short *" buf ", size_t " bufsiz ,
36 .BI " size_t " offset ", unsigned int " scale );
40 Feature Test Macro Requirements for glibc (see
41 .BR feature_test_macros (7)):
45 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
47 This routine provides a means to find out in what areas your program
48 spends most of its time.
54 Every virtual 10 milliseconds, the user's program counter (PC)
57 is subtracted and the result is multiplied by
60 If the resulting value is less than
62 then the corresponding entry in
67 is NULL, profiling is disabled.
69 Zero is always returned.
71 Similar to a call in SVr4 (but not POSIX.1-2001).
74 cannot be used on a program that also uses
79 True kernel profiling provides more accurate results.
80 Libc 4.4 contained a kernel patch providing a system call profil.