1PERF-KOWRK(1)                     perf Manual                    PERF-KOWRK(1)
2
3
4

NAME

6       perf-kwork - Tool to trace/measure kernel work properties (latencies)
7

SYNOPSIS

9       perf kwork {record|report|latency|timehist}
10

DESCRIPTION

12       There are several variants of perf kwork:
13
14           'perf kwork record <command>' to record the kernel work
15           of an arbitrary workload.
16
17           'perf kwork report' to report the per kwork runtime.
18
19           'perf kwork latency' to report the per kwork latencies.
20
21           'perf kwork timehist' provides an analysis of kernel work events.
22
23           Example usage:
24               perf kwork record -- sleep 1
25               perf kwork report
26               perf kwork report -b
27               perf kwork latency
28               perf kwork latency -b
29               perf kwork timehist
30
31           By default it shows the individual work events such as irq, workqeueu,
32           including the run time and delay (time between raise and actually entry):
33
34              Runtime start      Runtime end        Cpu     Kwork name                 Runtime     Delaytime
35                                                            (TYPE)NAME:NUM             (msec)      (msec)
36           -----------------  -----------------  ------  -------------------------  ----------  ----------
37              1811186.976062     1811186.976327  [0000]  (s)RCU:9                        0.266       0.114
38              1811186.978452     1811186.978547  [0000]  (s)SCHED:7                      0.095       0.171
39              1811186.980327     1811186.980490  [0000]  (s)SCHED:7                      0.162       0.083
40              1811186.981221     1811186.981271  [0000]  (s)SCHED:7                      0.050       0.077
41              1811186.984267     1811186.984318  [0000]  (s)SCHED:7                      0.051       0.075
42              1811186.987252     1811186.987315  [0000]  (s)SCHED:7                      0.063       0.081
43              1811186.987785     1811186.987843  [0006]  (s)RCU:9                        0.058       0.645
44              1811186.988319     1811186.988383  [0000]  (s)SCHED:7                      0.064       0.143
45              1811186.989404     1811186.989607  [0002]  (s)TIMER:1                      0.203       0.111
46              1811186.989660     1811186.989732  [0002]  (s)SCHED:7                      0.072       0.310
47              1811186.991295     1811186.991407  [0002]  eth0:10                         0.112
48              1811186.991639     1811186.991734  [0002]  (s)NET_RX:3                     0.095       0.277
49              1811186.989860     1811186.991826  [0002]  (w)vmstat_shepherd              1.966       0.345
50            ...
51
52           Times are in msec.usec.
53

OPTIONS

55       -D, --dump-raw-trace=
56           Display verbose dump of the sched data.
57
58       -f, --force
59           Don’t complain, do it.
60
61       -k, --kwork
62           List of kwork to profile (irq, softirq, workqueue, etc)
63
64       -v, --verbose
65           Be more verbose. (show symbol address, etc)
66
67       OPTIONS for perf kwork report
68
69
70           .ft C
71           -b::
72           --use-bpf::
73                   Use BPF to measure kwork runtime
74
75           -C::
76           --cpu::
77                   Only show events for the given CPU(s) (comma separated list).
78
79           -i::
80           --input::
81                   Input file name. (default: perf.data unless stdin is a fifo)
82
83           -n::
84           --name::
85                   Only show events for the given name.
86
87           -s::
88           --sort::
89                   Sort by key(s): runtime, max, count
90
91           -S::
92           --with-summary::
93                   Show summary with statistics
94
95           --time::
96                   Only analyze samples within given time window: <start>,<stop>. Times
97                   have the format seconds.microseconds. If start is not given (i.e., time
98                   string is ',x.y') then analysis starts at the beginning of the file. If
99                   stop time is not given (i.e, time string is 'x.y,') then analysis goes
100                   to end of file.
101
102           OPTIONS for 'perf kwork latency'
103           .ft
104
105
106       -b, --use-bpf
107           Use BPF to measure kwork latency
108
109       -C, --cpu
110           Only show events for the given CPU(s) (comma separated list).
111
112       -i, --input
113           Input file name. (default: perf.data unless stdin is a fifo)
114
115       -n, --name
116           Only show events for the given name.
117
118       -s, --sort
119           Sort by key(s): avg, max, count
120
121       --time
122           Only analyze samples within given time window: <start>,<stop>.
123           Times have the format seconds.microseconds. If start is not given
124           (i.e., time string is ,x.y) then analysis starts at the beginning
125           of the file. If stop time is not given (i.e, time string is x.y,)
126           then analysis goes to end of file.
127

OPTIONS FOR PERF KWORK TIMEHIST

129       -C, --cpu
130           Only show events for the given CPU(s) (comma separated list).
131
132       -g, --call-graph
133           Display call chains if present (default off).
134
135       -i, --input
136           Input file name. (default: perf.data unless stdin is a fifo)
137
138       -k, --vmlinux=<file>
139           Vmlinux pathname
140
141       -n, --name
142           Only show events for the given name.
143
144       --kallsyms=<file>
145           Kallsyms pathname
146
147       --max-stack
148           Maximum number of functions to display in backtrace, default 5.
149
150       --symfs=<directory>
151           Look for files with symbols relative to this directory.
152
153       --time
154           Only analyze samples within given time window: <start>,<stop>.
155           Times have the format seconds.microseconds. If start is not given
156           (i.e., time string is ,x.y) then analysis starts at the beginning
157           of the file. If stop time is not given (i.e, time string is x.y,)
158           then analysis goes to end of file.
159

SEE ALSO

161       perf-record(1)
162
163
164
165perf                              11/28/2023                     PERF-KOWRK(1)
Impressum