1PERF-KOWRK(1) perf Manual PERF-KOWRK(1)
2
3
4
6 perf-kwork - Tool to trace/measure kernel work properties (latencies)
7
10 There are several variants of perf kwork:
11
12 'perf kwork record <command>' to record the kernel work
13 of an arbitrary workload.
14
15 'perf kwork report' to report the per kwork runtime.
16
17 'perf kwork latency' to report the per kwork latencies.
18
19 'perf kwork timehist' provides an analysis of kernel work events.
20
21 Example usage:
22 perf kwork record -- sleep 1
23 perf kwork report
24 perf kwork report -b
25 perf kwork latency
26 perf kwork latency -b
27 perf kwork timehist
28
29 By default it shows the individual work events such as irq, workqeueu,
30 including the run time and delay (time between raise and actually entry):
31
32 Runtime start Runtime end Cpu Kwork name Runtime Delaytime
33 (TYPE)NAME:NUM (msec) (msec)
34 ----------------- ----------------- ------ ------------------------- ---------- ----------
35 1811186.976062 1811186.976327 [0000] (s)RCU:9 0.266 0.114
36 1811186.978452 1811186.978547 [0000] (s)SCHED:7 0.095 0.171
37 1811186.980327 1811186.980490 [0000] (s)SCHED:7 0.162 0.083
38 1811186.981221 1811186.981271 [0000] (s)SCHED:7 0.050 0.077
39 1811186.984267 1811186.984318 [0000] (s)SCHED:7 0.051 0.075
40 1811186.987252 1811186.987315 [0000] (s)SCHED:7 0.063 0.081
41 1811186.987785 1811186.987843 [0006] (s)RCU:9 0.058 0.645
42 1811186.988319 1811186.988383 [0000] (s)SCHED:7 0.064 0.143
43 1811186.989404 1811186.989607 [0002] (s)TIMER:1 0.203 0.111
44 1811186.989660 1811186.989732 [0002] (s)SCHED:7 0.072 0.310
45 1811186.991295 1811186.991407 [0002] eth0:10 0.112
46 1811186.991639 1811186.991734 [0002] (s)NET_RX:3 0.095 0.277
47 1811186.989860 1811186.991826 [0002] (w)vmstat_shepherd 1.966 0.345
48 ...
49
50 Times are in msec.usec.
51
53 -D, --dump-raw-trace=
54 Display verbose dump of the sched data.
55
56 -f, --force
57 Don’t complain, do it.
58
59 -k, --kwork
60 List of kwork to profile (irq, softirq, workqueue, etc)
61
62 -v, --verbose
63 Be more verbose. (show symbol address, etc)
64
65 OPTIONS for perf kwork report
66
67
68 .ft C
69 -b::
70 --use-bpf::
71 Use BPF to measure kwork runtime
72
73 -C::
74 --cpu::
75 Only show events for the given CPU(s) (comma separated list).
76
77 -i::
78 --input::
79 Input file name. (default: perf.data unless stdin is a fifo)
80
81 -n::
82 --name::
83 Only show events for the given name.
84
85 -s::
86 --sort::
87 Sort by key(s): runtime, max, count
88
89 -S::
90 --with-summary::
91 Show summary with statistics
92
93 --time::
94 Only analyze samples within given time window: <start>,<stop>. Times
95 have the format seconds.microseconds. If start is not given (i.e., time
96 string is ',x.y') then analysis starts at the beginning of the file. If
97 stop time is not given (i.e, time string is 'x.y,') then analysis goes
98 to end of file.
99
100 OPTIONS for 'perf kwork latency'
101 .ft
102
103
104 -b, --use-bpf
105 Use BPF to measure kwork latency
106
107 -C, --cpu
108 Only show events for the given CPU(s) (comma separated list).
109
110 -i, --input
111 Input file name. (default: perf.data unless stdin is a fifo)
112
113 -n, --name
114 Only show events for the given name.
115
116 -s, --sort
117 Sort by key(s): avg, max, count
118
119 --time
120 Only analyze samples within given time window: <start>,<stop>.
121 Times have the format seconds.microseconds. If start is not given
122 (i.e., time string is ,x.y) then analysis starts at the beginning
123 of the file. If stop time is not given (i.e, time string is x.y,)
124 then analysis goes to end of file.
125
127 -C, --cpu
128 Only show events for the given CPU(s) (comma separated list).
129
130 -g, --call-graph
131 Display call chains if present (default off).
132
133 -i, --input
134 Input file name. (default: perf.data unless stdin is a fifo)
135
136 -k, --vmlinux=<file>
137 Vmlinux pathname
138
139 -n, --name
140 Only show events for the given name.
141
142 --kallsyms=<file>
143 Kallsyms pathname
144
145 --max-stack
146 Maximum number of functions to display in backtrace, default 5.
147
148 --symfs=<directory>
149 Look for files with symbols relative to this directory.
150
151 --time
152 Only analyze samples within given time window: <start>,<stop>.
153 Times have the format seconds.microseconds. If start is not given
154 (i.e., time string is ,x.y) then analysis starts at the beginning
155 of the file. If stop time is not given (i.e, time string is x.y,)
156 then analysis goes to end of file.
157
159 perf-record(1)
160
161
162
163perf 01/12/2023 PERF-KOWRK(1)