[LITMUS^RT] RFC: kernel-style events for Litmus^RT

Andrea Bastoni bastoni at cs.unc.edu
Sat Feb 11 22:17:58 CET 2012


Hi all,

I've managed to expand and polish a bit a patch that I've had around for a
while. It basically enables the same sched_trace_XXX() functions that we
currently use to trace scheduling events, but it does so using kernel-style
events (/sys/kernel/debug/tracing/ etc.).

So, why another tracing infrastructure:
- Litmus tracepoints can be recorded and analyzed together (single
  time reference) with all other kernel tracing events (e.g.,
  sched:sched_switch, etc.). It's easier to correlate the effects
  of kernel events on litmus tasks.

- It enables a quick way to visualize and process schedule traces
  using trace-cmd utility and kernelshark visualizer.
  Kernelshark lacks unit-trace's schedule-correctness checks, but
  it enables a fast view of schedule traces and it has several
  filtering options (for all kernel events, not only Litmus').

Attached (I hope the ML won't filter images ;)) you can find the visualization
of a simple set of rtspin tasks. Particularly, getting the trace of a single
task is straightforward using trace-cmd:

# trace-cmd record -e sched:sched_switch -e litmus:* ./rtspin -p 0 50 100 2

and to visualize it:

# kernelshark trace.dat

trace-cmd can be fetch here:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git

(kernelshark it's just the "make gui" of trace-cmd; trace-cmd and kernelshark
have a lot more features than simple filtering and visualization; hopefully it
should be a good help for debugging.)

The patch is on "wip-tracepoints" on main repository and jupiter.

Info on trace-cmd, kernelshark, and ftrace are available here:

http://lwn.net/Articles/341902/
http://lwn.net/Articles/425583/
http://rostedt.homelinux.com/kernelshark/
http://lwn.net/Articles/365835/
http://lwn.net/Articles/366796/

Thanks,
- Andrea
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-kernel-style-events-for-sched_trace_XXX-function.patch
Type: text/x-diff
Size: 12023 bytes
Desc: not available
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120211/c84870f0/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace-sched_switch-litmus-3tasks.png
Type: image/png
Size: 33367 bytes
Desc: not available
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120211/c84870f0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace-sched_switch-litmus-rtspin-50_100.png
Type: image/png
Size: 23246 bytes
Desc: not available
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120211/c84870f0/attachment-0001.png>


More information about the litmus-dev mailing list