|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)profil.2 6.2 (Berkeley) 5/14/86
6: .\"
7: .TH PROFIL 2 "May 14, 1986"
8: .UC 4
9: .SH NAME
10: profil \- execution time profile
11: .SH SYNOPSIS
12: .nf
13: .B profil(buff, bufsiz, offset, scale)
14: .B char *buff;
15: .B int bufsiz, offset, scale;
16: .fi
17: .SH DESCRIPTION
18: .I Buff
19: points to an area of core whose length (in bytes) is given by
20: .IR bufsiz .
21: After this call, the user's program counter (pc)
22: is examined each clock tick (10 milliseconds);
23: .I offset
24: is subtracted from it, and the result multiplied by
25: .IR scale .
26: If the resulting number corresponds to a word
27: inside
28: .I buff,
29: that word is incremented.
30: .PP
31: The scale is interpreted as an unsigned,
32: fixed-point fraction with 16 bits of fraction:
33: 0x10000 gives a 1-1 mapping of pc's to words
34: in
35: .I buff;
36: 0x8000 maps each pair of instruction words
37: together.
38: .PP
39: Profiling is turned off by giving a
40: .I scale
41: of 0 or 1.
42: It is rendered
43: ineffective by giving a
44: .I bufsiz
45: of 0.
46: Profiling is turned off when an
47: .I execve
48: is executed, but remains on in child and parent both
49: after a
50: .IR fork .
51: Profiling is turned off if an update in
52: .I buff
53: would cause a memory fault.
54: .SH "RETURN VALUE
55: A 0, indicating success, is always returned.
56: .SH "SEE ALSO"
57: gprof(1), setitimer(2), monitor(3)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.