Re: How to find long execution times in kernel threads?

Carsten Emde
2013-04-30T16:56:07Z

Stano,

> I am experimenting with the cyclictest on a system running
> several RT threads to find out where some latencies are
> coming from and to get a better undertanding how the system
> behaves.
>[..]
> Basically I'd like to trace what happened between a particular
> process (not the highest priority one) was woken up until
> it got scheduled, and stop if this took longer than some
> defined time. Can this be done with the current tracing
> infrastructure?
Sure, record everything (trace-cmd record -e all) and analyze the
traces. Use kernelshark, if you prefer a GUI. I wrote a blog article on
this topic about three years ago:
https://www.osadl.org/Single-View.111+M5dc445b8ee7.0.html

Once you get an idea what is going on and which traces, events and/or
processes are particularly interesting, you may filter the recording
(trace-cmd record --help) in order to focus on your case and to reduce
Heisenberg.

Hope this helps,
-Carsten.