bcc
bcc copied to clipboard
tool request: offcpudist
The counterpart to cpudist ( #499 ), this tool would print histograms of off-CPU (blocked) time by process.
Again, the existing code for runqlat should be a good starting point.
would you see this as using the add_wait_queue and remove_wait_queue functions?
If I were using kprobes, I'd be doing it from the scheduler switch routine. Something like finish_task_switch. The add/remove_wait_queue functions would be interesting to trace, but for other reasons -- digging into queueing latency, length, etc. Here we just want total time off-CPU.
But now we have tracepoints, it would be great to use them. Eg, maybe sched:sched_switch.