[LITMUS^RT] Sched trace tool

Glenn Elliott gelliott at cs.unc.edu
Wed Nov 20 22:14:47 CET 2013


I’m afraid not.  This is one reason why it’s not found in the LITMUS^RT github repositories, but rather in B. Brandenburg’s.

Here are a few tips:

1) The repo compiles with ‘scons’ instead of 'make’.
2) st_show can be used to view the sched trace data.  The code for this program in src/showst.c.  Read this code to figure out the command line arguments.
3) Use showst.c as a model for your own custom analysis code.  Most important: the core loop (showst.c:68) to showst.c extracts logged events in temporal order.
4) include/sched_trace.h has data structures that mirror the data structures from litmus-rt/include/litmus/sched_trace.h.  First, double check that the data structures match your kernel’s. Second, look at the fields and events to understand what data is logged by each event type.

Suppose you want to write code that finds the response time (release time minus completion time) for every job.  Each job can be uniquely identified by a pid/job number pair.  These fields are found in the st_trace_header struct, which is a part of every sched_trace event.  st_release_data has the job release time.  st_completion_data has the completion time.  Use the st_trace_header in each release/completion to match release events with completion events.

If you find a field that you don’t understand, go back to your kernel’s source code and find where the event is actually logged.  Hopefully you’ll be able to figure it out by digging into the code.  If you really get stumped, post a question here.  Finally, it’s pretty easy to add your own trace events to sched_trace, but you’ll have to dig into kernel code.

-Glenn


On Nov 20, 2013, at 3:35 PM, ayoade gbadebo <gbaduz at gmail.com> wrote:

> 
> Hi,
> Is there a readme file on how to use this tool?
>  https://github.com/brandenburg/sched-trace-tools
> 
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20131120/e509d363/attachment.html>


More information about the litmus-dev mailing list