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 1993-07-23 "Linux 2.0" "Linux Programmer's Manual"
30 profil \- execution time profile
32 .B #include <unistd.h>
34 .BI "int profil(u_short *" buf ", size_t " bufsiz ", size_t " offset ", u_int " scale );
36 This routine provides a means to find out in what areas your program
37 spends most of its time. The argument
41 bytes of core. Every virtual 10 milliseconds, the user's program counter (PC)
44 is subtracted and the result is multiplied by
47 If the resulting value is less than
49 then the corresponding entry in
54 is NULL, profiling is disabled.
56 Zero is always returned.
59 cannot be used on a program that also uses
63 True kernel profiling provides more accurate results.
64 Libc 4.4 contained a kernel patch providing a system call profil.
66 Similar to a call in SVr4 (but not POSIX.1).