Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / share / doc / papers / kerntune / 0.t
1 .\" Copyright (c) 1984 M. K. McKusick
2 .\" Copyright (c) 1984 The Regents of the University of California.
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by the University of
16 .\"     California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\"     @(#)0.t 1.2 (Berkeley) 11/8/90
34 .\"
35 .EQ
36 delim $$
37 .EN
38 .if n .ND
39 .TL
40 Using gprof to Tune the 4.2BSD Kernel
41 .AU
42 Marshall Kirk McKusick
43 .AI
44 Computer Systems Research Group
45 Computer Science Division
46 Department of Electrical Engineering and Computer Science
47 University of California, Berkeley
48 Berkeley, California  94720
49 .AB
50 This paper describes how the \fIgprof\fP profiler 
51 accounts for the running time of called routines
52 in the running time of the routines that call them.
53 It then explains how to configure a profiling kernel on
54 the 4.2 Berkeley Software Distribution of 
55 .UX
56 for the VAX\(dd
57 .FS
58 \(dd VAX is a trademark of Digital Equipment Corporation.
59 .FE
60 and discusses tradeoffs in techniques for collecting
61 profile data.
62 \fIGprof\fP identifies problems
63 that severely affects the overall performance of the kernel.
64 Once a potential problem areas is identified
65 benchmark programs are devised to highlight the bottleneck.
66 These benchmarks verify that the problem exist and provide
67 a metric against which to validate proposed solutions.
68 Two caches are added to the kernel to alleviate the bottleneck
69 and \fIgprof\fP is used to validates their effectiveness.
70 .AE
71 .LP
72 .de PT
73 .lt \\n(LLu
74 .pc %
75 .nr PN \\n%
76 .tl '\\*(LH'\\*(CH'\\*(RH'
77 .lt \\n(.lu
78 ..
79 .af PN i
80 .ds LH 4.2BSD Performance
81 .ds RH Contents
82 .bp 1
83 .if t .ds CF May 21, 1984
84 .if t .ds LF
85 .if t .ds RF McKusick
86 .ce
87 .B "TABLE OF CONTENTS"
88 .LP
89 .sp 1
90 .nf
91 .B "1.  Introduction"
92 .LP
93 .sp .5v
94 .nf
95 .B "2.  The \fIgprof\fP Profiler"
96 \0.1.    Data Presentation"
97 \0.1.1.   The Flat Profile
98 \0.1.2.   The Call Graph Profile
99 \0.2     Profiling the Kernel
100 .LP
101 .sp .5v
102 .nf
103 .B "3.  Using \fIgprof\fP to Improve Performance
104 \0.1.    Using the Profiler
105 \0.2.    An Example of Tuning
106 .LP
107 .sp .5v
108 .nf
109 .B "4.  Conclusions"
110 .LP
111 .sp .5v
112 .nf
113 .B Acknowledgements
114 .LP
115 .sp .5v
116 .nf
117 .B References
118 .af PN 1
119 .bp 1
120 .de _d
121 .if t .ta .6i 2.1i 2.6i
122 .\" 2.94 went to 2.6, 3.64 to 3.30
123 .if n .ta .84i 2.6i 3.30i
124 ..
125 .de _f
126 .if t .ta .5i 1.25i 2.5i
127 .\" 3.5i went to 3.8i
128 .if n .ta .7i 1.75i 3.8i
129 ..