From 3123c38b81426c07b8a95428d5c1d8c3b188964e Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Wed, 12 Jan 2011 20:05:33 -0500 Subject: update tracing doc for 2011.1 --- doc/tracing.html | 38 +++++++++++++------------------------- doc/tracing.txt | 36 +++++++++++------------------------- 2 files changed, 24 insertions(+), 50 deletions(-) diff --git a/doc/tracing.html b/doc/tracing.html index 6a54b62..3513bb4 100644 --- a/doc/tracing.html +++ b/doc/tracing.html @@ -11,9 +11,9 @@ @@ -37,7 +37,7 @@ TITLE=Tracing with LITMUS^RT This document is part of the documentation of the LITMUSRT project. -

As of version 2010.2, there are three tracing mechanisms available in LITMUSRT:

+

As of version 2011.1, there are three tracing mechanisms available in LITMUSRT:

  1. litmus_log: This trace contains text messages (created with the TRACE() @@ -49,28 +49,15 @@ macro, see litmus.h) that convey information useful for debugging.

    Accessing Trace Buffers

    -

    litmus_log functionality is provided through the kernel's misc driver interface. As a result, litmus_log is automatically made available through /dev/litmus/log on systems with default udev rules.

    +

    litmus_log functionality is provided through the kernel's misc driver interface. The other two traces are exported to user space through standard character device drivers.

    -

    The other two traces are exported to user space through standard character device drivers. The major numbers allocated by the drivers can be discovered by looking at /proc/devices. Usually, the major numbers are 252 and 253, respectively. The per-processor buffers are accessible via the minor numbers of the sched_trace driver.

    +

    On systems with default udev rules, the devices are created in the /dev/litmus/ directory:

    -

    Thus, device files for ft_trace and sched_trace can be created with the following script.

    - -
    #!/bin/bash
    -
    -FT_TRACE_MAJOR=`grep ft_trace /proc/devices | awk '{print $1}'`
    -SCHED_TRACE_MAJOR=`grep sched_trace /proc/devices | awk '{print $1}'`
    -
    -mknod ft_trace   c $FT_TRACE_MAJOR   0
    -
    -NUM_PROCS=$((`grep 'processor' /proc/cpuinfo | wc -l` - 1))
    -
    -for P in `seq 0 $NUM_PROCS`
    -do
    -    mknod "sched_trace$P" c  $SCHED_TRACE_MAJOR  $P
    -done
    -
    - -

    Alternatively, one can setup udev rules to create the devices on demand. This, however, is beyond the scope of this document.

    +
      +
    • The litmus_log trace is exported as /dev/litmus/log.
    • +
    • The ft_trace trace is exported as /dev/litmus/ft_trace0.
    • +
    • The sched_trace traces are exported as /dev/litmus/sched_trace0, /dev/litmus/sched_trace1, etc.
    • +

    Recording Debug Traces

    @@ -185,7 +172,7 @@ Disabling 9 events.

    Hint: The dummy real-time task rtspin (distributed as part of the liblitmus package) may be useful when studying/testing the behavior of a scheduler plugin.

    -

    Recorded scheduling traces can be analyzed with Unit-Trace. Alternatively, the user space library and tools package liblitmus contains the necessary headers to write sched_trace post-processing and analysis tools (see include/sched_trace.h and src/sched_trace.c).

    +

    Recorded scheduling traces can be analyzed with Unit-Trace.

    Concluding Remarks

    @@ -196,6 +183,7 @@ Disabling 9 events. diff --git a/doc/tracing.txt b/doc/tracing.txt index 80d14b0..106ec04 100644 --- a/doc/tracing.txt +++ b/doc/tracing.txt @@ -1,9 +1,9 @@ @@ -28,7 +28,7 @@ Tracing with LITMUSRT This document is part of the documentation of the LITMUSRT project. -As of version 2010.2, there are three tracing mechanisms available in LITMUSRT: +As of version 2011.1, there are three tracing mechanisms available in LITMUSRT: 1. `litmus_log`: This trace contains text messages (created with the `TRACE()` macro, see `litmus.h`) that convey information useful for debugging. There is one global @@ -41,27 +41,13 @@ macro, see `litmus.h`) that convey information useful for debugging. There is on Accessing Trace Buffers ----------------------- -`litmus_log` functionality is provided through the kernel's `misc` driver interface. As a result, `litmus_log` is automatically made available through `/dev/litmus/log` on systems with default udev rules. +`litmus_log` functionality is provided through the kernel's `misc` driver interface. The other two traces are exported to user space through standard character device drivers. -The other two traces are exported to user space through standard character device drivers. The major numbers allocated by the drivers can be discovered by looking at `/proc/devices`. Usually, the major numbers are 252 and 253, respectively. The per-processor buffers are accessible via the minor numbers of the `sched_trace` driver. +On systems with default udev rules, the devices are created in the `/dev/litmus/` directory: -Thus, device files for `ft_trace` and `sched_trace` can be created with the following script. - - #!/bin/bash - - FT_TRACE_MAJOR=`grep ft_trace /proc/devices | awk '{print $1}'` - SCHED_TRACE_MAJOR=`grep sched_trace /proc/devices | awk '{print $1}'` - - mknod ft_trace c $FT_TRACE_MAJOR 0 - - NUM_PROCS=$((`grep 'processor' /proc/cpuinfo | wc -l` - 1)) - - for P in `seq 0 $NUM_PROCS` - do - mknod "sched_trace$P" c $SCHED_TRACE_MAJOR $P - done - -Alternatively, one can setup `udev` rules to create the devices on demand. This, however, is beyond the scope of this document. +- The `litmus_log` trace is exported as `/dev/litmus/log`. +- The `ft_trace` trace is exported as `/dev/litmus/ft_trace0`. +- The `sched_trace` traces are exported as `/dev/litmus/sched_trace0`, `/dev/litmus/sched_trace1`, etc. Recording Debug Traces ---------------------- @@ -171,7 +157,7 @@ Note that `st_trace` may have to be modified to change the default `sched_trace` **Hint**: The dummy real-time task `rtspin` (distributed as part of the `liblitmus` package) may be useful when studying/testing the behavior of a scheduler plugin. -Recorded scheduling traces can be analyzed with [Unit-Trace](http://cs.unc.edu/~mollison/unit-trace). Alternatively, the user space library and tools package `liblitmus` contains the necessary headers to write `sched_trace` post-processing and analysis tools (see `include/sched_trace.h` and `src/sched_trace.c`). +Recorded scheduling traces can be analyzed with [Unit-Trace](http://cs.unc.edu/~mollison/unit-trace). Concluding Remarks ------------------ @@ -182,4 +168,4 @@ Change History -------------- - Initially written by Bjoern B. Brandenburg (bbb at cs.unc.edu) on 12/09/2008. - Updated for LITMUSRT version 2010.2 by Mac Mollison (mollison at cs.unc.edu) on 11/08/2010. - +- Updated for LITMUSRT version 2011.1 by Bjoern B. Brandenburg (bbb at cs.unc.edu) on 01/12/2011. -- cgit v1.2.2