summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGary Bressler <garybressler@nc.rr.com>2010-04-08 17:11:08 -0400
committerGary Bressler <garybressler@nc.rr.com>2010-04-08 17:11:08 -0400
commitceff6457bfeb5642616f4711f14e0bb652d12164 (patch)
treed05b4ebd1c3ee6e28884c669d65fd31700941086 /doc
parent01abc8352aa2fd192678b4066b26ea749a203801 (diff)
Updated the documentation to describe the visualizer, made unit-trace itself not require gtk/cairo, and a few other minor things.
Diffstat (limited to 'doc')
-rw-r--r--doc/index.txt79
1 files changed, 76 insertions, 3 deletions
diff --git a/doc/index.txt b/doc/index.txt
index 9360e40..135579b 100644
--- a/doc/index.txt
+++ b/doc/index.txt
@@ -115,9 +115,82 @@ Some submodules have further documentation, appearing later in this document.
115 115
116## Specific Submodule Documentation ## 116## Specific Submodule Documentation ##
117 117
118Here, documentation is provided for submodules for which relevant information is not considered to be self-evident. 118### The Visualizer Module ###
119
120The visualizer can give you an on-the-fly visual representation of the input
121stream, with the ability to scroll through a graph of the schedule and inspect
122various elements of it. To run the visualizer, add the `-v`
123option when invoking unit-trace. Note that you don't have to run the visualizer
124by itself -- for instance, you can both run the visualizer and get input to
125stdout by combining the `-v` and `-o`
126options. The information that goes into the visualizer is dependent on the
127input parameters you specify. For example, if you use `-e`
128and `-l` to specify a time range, the visualizer will
129generate a graph restricted to that time range.
130
131When the visualizer starts up, you'll see the beginning of the graph which the
132visualizer automatically generated. We'll first discuss the axes.
133The x-axis gives time (in whatever units
134the trace file was using). The meanings of the markings by y-axis depend on whether you
135are in Task Mode or CPU Mode. (You can change between Task Mode and
136CPU Mode by clicking the tabs at the top.) In Task Mode, the schedule is organized
137by task, so each item listed to the left of the y-axis gives
138the name of a task that was running (at present, the name of a task is its PID).
139Likewise, in CPU Mode the schedule is organized by CPU number, and each item
140gives the identifier of a CPU that at one point was used by at least one task.
141
142The horizontal cross-section demarcated by each task name or CPU
143identifier gives the chronological sequence of events in the input stream
144for the relevant task or CPU. The event symbols are as follows:
119 145
120(So far, it hasn't been necessary to add anything here, but once questions arise, it will become clear which submodules need to be documented more fully.) 146<table border=1>
147<tr><td>Symbol Description</td><td>Event Type</td><td>Meaning</td></tr>
148<tr><td>Large colored bar</td><td>Scheduled</td><td>A job was scheduled during the period spanned by the bar.</td>
149<tr><td>Black triangle</td><td>Suspend (Block)</td><td>A task blocked at this time.</td></tr>
150<tr><td>White triangle</td><td>Resume (Unblock)</td><td>A task resumed execution at this time.</td></tr>
151<tr><td>"T" shape</td><td>Complete</td><td>A task signaled its completion of a job at this time.</td></tr>
152<tr><td>Large up arrow</td><td>Release</td><td>A job release occurred. (Appears only in Task Mode.)</td></tr>
153<tr><td>Small up arrow</td><td>Release</td><td>A job release occurred. (Appears only in CPU Mode. These appear
154attached to the x-axis, as is customary, rather than in a CPU's area.)</td></tr>
155<tr><td>Large down arrow</td><td>Deadline</td><td>A job's deadline occurs at this time. (Appears only in Task Mode.)</td></tr>
156<tr><td>Small down arrow</td><td>Deadline</td><td>A job's deadline occurs at this time. (Appears only in CPU Mode. These appear
157attached to the x-axis, as is customary, rather than in a CPU's area.)</td></tr>
158<tr><td>Small colored bar</td><td>Priority Inversion</td><td>(Appears only in conjuction with the gedf_test module.) A priority inversion occurred for some task: that is, the task in question <i>should</i> have been scheduled at the depicted time, but wasn't. In Task Mode these are organized by task (and appear gray since color would be redundant), and in CPU mode they appear at the bottom, colored by task.</td></tr>
159</table>
160
161If you're unsure as
162to what a certain symbol means, you can also mouse over it in the visualizer
163and read the description at the bottom of the screen.
164
165Also, a note about the `Scheduled` (and `Priority Inversion`) events: each of these events actually
166corresponds to two events in the input stream. Namely, a `Scheduled` event is really a `Switch To`
167event paired with a `Switch Away` event, and a `Priority Inversion` event is really an
168`Inversion Start` event paired with an `Inversion End` event. These events of course correspond to
169being scheduled and being descheduled, respectively. <i>However</i>, if the visualizer module
170finds a start event but not an end event (or vice-versa), it assumes that the corresponding
171event occurred, but at a time not in the input stream.
172In other words, it assumes that such events are genuine. To represent this phenomenon,
173the visualizer shows the bar going "off the graph".
174
175Interacting with the visualizer is easy. The scrollbars work in the obvious way. You can also
176use the arrow keys to move, or use Ctrl+arrow keys to move faster. Mousing over an event gives
177a description of the event at the bottom. You can also click an event to
178select it. Hold down Ctrl to select multiple events. You can also drag a box around multiple
179events to select them. You can even combine this with the Ctrl key to select multiple
180boxes of events in succession. Your selection is independent of the mode you are in --
181thus if you wanted to see e.g. what CPUs a task was running on from time A to time B,
182you could just select all the events under the task in question in Task Mode and then
183switch over to CPU mode. Right-click and you will get a context menu containing each event
184you selected. Selecting an item in the menu gives you detailed information about the event
185in its own window.
186
187If you want to see what's happening at a certain time, but don't want to bother scrolling there
188manually, you can select `View->Move to Time` and type in the time you want to move to.
189
190You can also zoom by either going to `View->Zoom In/Out`, or by holding down Ctrl and scrolling
191the mouse wheel.
192
193To exit the Unit-Trace visualizer, go to `File->Quit` or click the close button.
121 194
122## Gotchas ## 195## Gotchas ##
123 196
@@ -150,7 +223,7 @@ The following "rules" are currently in place:
150### Architecture ### 223### Architecture ###
151If you are interested in contributing to Unit-Trace, you probably ought to know a bit about its overall architecture. 224If you are interested in contributing to Unit-Trace, you probably ought to know a bit about its overall architecture.
152 225
153Generally speaking, each Unit-Trace submodules is a Python generator. It accepts a Python iterator object as input and returns a Python iterator 226Generally speaking, each Unit-Trace submodule is a Python generator. It accepts a Python iterator object as input and returns a Python iterator
154object as output. (You may want to look up the relevant Python terminology.) 227object as output. (You may want to look up the relevant Python terminology.)
155 228
156The exceptions are input submodules, which do not take any input other than a list of trace files, and the output submodules, which do not return 229The exceptions are input submodules, which do not take any input other than a list of trace files, and the output submodules, which do not return