blob: 58502a5ba60956dfe41a7a2cfa83d1646aee2cca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
.TH KP 1
.CT 1 proc_man sa_mortals
.SH NAME
kp \(mi kernel profiling
.SH SYNOPSIS
.B kp
[
.B -t
.I duration
]
[
.B -c
.I command
]
[
-
.B fsx
]
[
.I kernel
]
.PP
.SH DESCRIPTION
.I Kp
prints kernel profiling data.
If the
.B -t
option is specified
.I kp
uses data collected during a
sleep of the indicated duration
(in seconds).
If the
.B -c
option is specified
.I kp
uses data
collected while the indicated command is run
by
.IR system (3).
If neither option is specified
all profiling data since last boot is used;
it is illegal to specify both
.B -t
and
.B -c
options.
.LP
Profiling data consists of
(1)
clock-driven
.IR profil (2)-style
pc bucket counting
and
(2)
system call counts.
The bucket counts are reported resolved to the kernel source-file level
or the
external text symbol level,
according to whether the
.B -f
or
.B -x
options is given, respectively.
Raw unscaled bucket tick counts are given.
System call counts are reported if the
.B -s
option is specified.
Specifying none of
.B sfx
is equivalent to specifying them all:
the default treatment is to report ``the works.''
.LP
Normally the namelist in
.B /unix
is believed, but this may be overruled by giving the filename
.I kernel
argument.
.LP
Since this program needs privileges to read
.FR /dev/kmem ,
the
.B -c
option
is an invitation to horesmanship.
.SH FILES
.B /unix
.br
.B /dev/kmem
.SH BUGS
Not sorted.
|