PERF-KWORK(1)
π perf-kwork π
okay bestie, so this page is from the perf Manual β it's the perf-kwork page and it's literally about tracing/measuring kernel work properties (latencies). stay with me, it's actually so good π«Ά
β¨ NAME β¨
perf-kwork β the tool to trace/measure kernel work properties (latencies). periodt. that's the whole vibe.
πΈ SYNOPSIS πΈ
perf kwork {record|report|latency|timehist|top}
like, pick one of those five. that's the moment.
π¦ DESCRIPTION π¦
so there are several variants of perf kwork, and each one is kind of iconic in its own way:
'perf kwork record <command>'β records the kernel work of an arbitrary workload.'perf kwork report'β reports the per kwork runtime.'perf kwork latency'β reports the per kwork latencies.'perf kwork timehist'β provides an analysis of kernel work events.'perf kwork top'β reports the task cpu usage.
Example usage, bestie, copy these vibes:
perf kwork record -- sleep 1
perf kwork report
perf kwork report -b
perf kwork latency
perf kwork latency -b
perf kwork timehist
perf kwork top
perf kwork top -b
by default it shows the individual work events such as irq, workqueue, including the run time and delay (time between raise and actually entry) β and honestly, look at it:
Runtime start Runtime end Cpu Kwork name Runtime Delaytime
(TYPE)NAME:NUM (msec) (msec)
----------------- ----------------- ------ ------------------------- ---------- ----------
1811186.976062 1811186.976327 [0000] (s)RCU:9 0.266 0.114
1811186.978452 1811186.978547 [0000] (s)SCHED:7 0.095 0.171
1811186.980327 1811186.980490 [0000] (s)SCHED:7 0.162 0.083
1811186.981221 1811186.981271 [0000] (s)SCHED:7 0.050 0.077
1811186.984267 1811186.984318 [0000] (s)SCHED:7 0.051 0.075
1811186.987252 1811186.987315 [0000] (s)SCHED:7 0.063 0.081
1811186.987785 1811186.987843 [0006] (s)RCU:9 0.058 0.645
1811186.988319 1811186.988383 [0000] (s)SCHED:7 0.064 0.143
1811186.989404 1811186.989607 [0002] (s)TIMER:1 0.203 0.111
1811186.989660 1811186.989732 [0002] (s)SCHED:7 0.072 0.310
1811186.991295 1811186.991407 [0002] eth0:10 0.112
1811186.991639 1811186.991734 [0002] (s)NET_RX:3 0.095 0.277
1811186.989860 1811186.991826 [0002] (w)vmstat_shepherd 1.966 0.345
...
times are in msec.usec. don't forget, iykyk π
π OPTIONS π
the universal ones, the main character options:
-D,--dump-raw-trace=β display verbose dump of the sched data. yes the=is there, it's giving detail-oriented.-f,--forceβ don't complain, do it. literally the most gen z flag ever π-k,--kworkβ list of kwork to profile (irq,softirq,workqueue,sched, etc)-v,--verboseβ be more verbose. (show symbol address, etc)
π OPTIONS for perf kwork report π
-b,--use-bpfβ use BPF to measure kwork runtime-C,--cpuβ only show events for the given CPU(s) (comma separated list).-i,--inputβ input file name. (default:perf.dataunless stdin is a fifo)-n,--nameβ only show events for the given name.-s,--sortβ sort by key(s):runtime,max,count-S,--with-summaryβ show summary with statistics--timeβ only analyze samples within given time window:<start>,<stop>. Times have the formatseconds.microseconds. If start is not given (i.e., time string is',x.y') then analysis starts at the beginning of the file. If stop time is not given (i.e, time string is'x.y,') then analysis goes to end of file.
π OPTIONS for 'perf kwork latency' π
-b,--use-bpfβ use BPF to measure kwork latency-C,--cpuβ only show events for the given CPU(s) (comma separated list).-i,--inputβ input file name. (default:perf.dataunless stdin is a fifo)-n,--nameβ only show events for the given name.-s,--sortβ sort by key(s):avg,max,count--timeβ only analyze samples within given time window:<start>,<stop>. Times have the formatseconds.microseconds. If start is not given (i.e., time string is,x.y) then analysis starts at the beginning of the file. If stop time is not given (i.e, time string isx.y,) then analysis goes to end of file.
π OPTIONS FOR PERF KWORK TIMEHIST π
-C,--cpuβ only show events for the given CPU(s) (comma separated list).-g,--call-graphβ display call chains if present (default off).-i,--inputβ input file name. (default:perf.dataunless stdin is a fifo)-k,--vmlinux=<file>β vmlinux pathname-n,--nameβ only show events for the given name.--kallsyms=<file>β kallsyms pathname--max-stackβ maximum number of functions to display in backtrace, default5.--symfs=<directory[,layout]>β look for files with symbols relative to this directory. The optional layout can behierarchy(default, matches full path) orflat(only matches base name). This is useful when debug files are stored in a flat directory structure.--timeβ only analyze samples within given time window:<start>,<stop>. Times have the formatseconds.microseconds. If start is not given (i.e., time string is,x.y) then analysis starts at the beginning of the file. If stop time is not given (i.e, time string isx.y,) then analysis goes to end of file.
π OPTIONS for perf kwork top π
-b,--use-bpfβ use BPF to measure task cpu usage.-C,--cpuβ only show events for the given CPU(s) (comma separated list).-i,--inputβ input file name. (default:perf.dataunless stdin is a fifo)-n,--nameβ only show events for the given name.-s,--sortβ sort by key(s):rate,runtime,tid--timeβ only analyze samples within given time window:<start>,<stop>. Times have the formatseconds.microseconds. If start is not given (i.e., time string is',x.y') then analysis starts at the beginning of the file. If stop time is not given (i.e, time string is'x.y,') then analysis goes to end of file.
π₯ SEE ALSO π₯
go off, bestie, that's the only one you need π
okay that's the whole page, no cap. this masterpiece is from perf, version/date 10/31/2026, and it's the PERF-KWORK(1) page β slay, bye! πβ¨π¦
π¦ where this page comes from
- arch rolling: perf 7.3.1-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms