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 2021-03-22 "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)):
47 .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8
49 In glibc 2.19 and 2.20:
50 _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
51 Up to and including glibc 2.19:
52 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
55 This routine provides a means to find out in what areas your program
56 spends most of its time.
62 Every virtual 10 milliseconds, the user's program counter (PC)
65 is subtracted and the result is multiplied by
68 If the resulting value is less than
70 then the corresponding entry in
75 is NULL, profiling is disabled.
77 Zero is always returned.
79 For an explanation of the terms used in this section, see
87 Interface Attribute Value
90 T} Thread safety MT-Unsafe
96 Similar to a call in SVr4 (but not POSIX.1).
99 cannot be used on a program that also uses
104 True kernel profiling provides more accurate results.
105 .\" Libc 4.4 contained a kernel patch providing a system call profil.