[LITMUS^RT] Kernelshark visualizer
Jonathan Herman
hermanjl at cs.unc.edu
Fri Nov 16 20:43:04 CET 2012
As promised, I've added my visualizer code to the LITMUS^RT repos. First,
the userspace tool:
https://github.com/LITMUS-RT/rt-kernelshark
To compile:
$ make gui
Second, I've pushed a prop/rt-kshark branch for the kernelspace changes.
That change is two things:
1. save litmus_clock() values with every FTRACE record (FTRACE time is
unreliable)
2. add container visualization macros
This tool is for debugging and is meant to replace the old unit-trace
visualization code. It is significantly faster than unit-trace's visualizer
and has a more modular design so that new features (like containers) can be
added.
Example run:
$ trace-cmd record -e sched:sched_switch -e litmus:* &
$ echo GSN-EDF > /proc/litmus/active_plugin
$ rtspin -w 10 20 10
$ rtspin -w 10 20 10
$ rtspin -w 10 20 10
$ release_ts
# wait for tasks to finish
$ fg
$ <CTRL-C>
# visualize the schedule
$ kernelshark trace.dat
# can also pass in the -c flag to ignore records before release_ts
# call with -h to see other command line options
When kernelshark loads, the first thing you will see is a high-level view
of the CPUs:
http://imgur.com/a/sTcPL#CWOyk
Black areas represent time spent running tasks which aren't real-time. You
can zoom into an area by clicking and dragging the mouse to the right. You
can zoom out by clicking and dragging the mouse to the left. To plot tasks
or containers, use options under the "Plot" menu. It's faster to zoom in to
an area of interest before plotting tasks or containers, which are a lot
more complicated than CPUs.
An example of plotted tasks:
http://imgur.com/a/sTcPL#oGaAW
Currently releases, deadlines, completions, and blocked times are all
visualized. A task blocking would resemble the black lines used to denote
non-RT work for the CPU plots.
An example of a plotted container:
http://imgur.com/a/sTcPL#ayyek
The first colorspin line is a periodic server container for a userspace
task. I have unhelpfully given the container the same name as the userspace
task, which is the second colorspin line. I've used this to visualize locks
(a lock is "running" a task when that task holds the lock) and to visualize
different criticality levels in our mixed-criticality scheduler. This is a
very useful tool for visualizing all the abstractions we use in scheduling
theory and our last paper would not have succeeded without it.
I will add detailed documentation to the wiki in the next week, especially
for container visualization. Before I write that up, I want to send out a
cleaned version of our test scripts which automate experiment setup,
tracing, overhead measurements, and plotting.
Try it out! Report bugs on the github page!
--
Jonathan Herman
Department of Computer Science at UNC Chapel Hill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20121116/4ccb860a/attachment.html>
More information about the litmus-dev
mailing list