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