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