diff options
| author | Gary Bressler <garybressler@nc.rr.com> | 2010-04-08 17:11:08 -0400 |
|---|---|---|
| committer | Gary Bressler <garybressler@nc.rr.com> | 2010-04-08 17:11:08 -0400 |
| commit | ceff6457bfeb5642616f4711f14e0bb652d12164 (patch) | |
| tree | d05b4ebd1c3ee6e28884c669d65fd31700941086 /doc | |
| parent | 01abc8352aa2fd192678b4066b26ea749a203801 (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.txt | 79 |
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 | ||
| 118 | Here, documentation is provided for submodules for which relevant information is not considered to be self-evident. | 118 | ### The Visualizer Module ### |
| 119 | |||
| 120 | The visualizer can give you an on-the-fly visual representation of the input | ||
| 121 | stream, with the ability to scroll through a graph of the schedule and inspect | ||
| 122 | various elements of it. To run the visualizer, add the `-v` | ||
| 123 | option when invoking unit-trace. Note that you don't have to run the visualizer | ||
| 124 | by itself -- for instance, you can both run the visualizer and get input to | ||
| 125 | stdout by combining the `-v` and `-o` | ||
| 126 | options. The information that goes into the visualizer is dependent on the | ||
| 127 | input parameters you specify. For example, if you use `-e` | ||
| 128 | and `-l` to specify a time range, the visualizer will | ||
| 129 | generate a graph restricted to that time range. | ||
| 130 | |||
| 131 | When the visualizer starts up, you'll see the beginning of the graph which the | ||
| 132 | visualizer automatically generated. We'll first discuss the axes. | ||
| 133 | The x-axis gives time (in whatever units | ||
| 134 | the trace file was using). The meanings of the markings by y-axis depend on whether you | ||
| 135 | are in Task Mode or CPU Mode. (You can change between Task Mode and | ||
| 136 | CPU Mode by clicking the tabs at the top.) In Task Mode, the schedule is organized | ||
| 137 | by task, so each item listed to the left of the y-axis gives | ||
| 138 | the name of a task that was running (at present, the name of a task is its PID). | ||
| 139 | Likewise, in CPU Mode the schedule is organized by CPU number, and each item | ||
| 140 | gives the identifier of a CPU that at one point was used by at least one task. | ||
| 141 | |||
| 142 | The horizontal cross-section demarcated by each task name or CPU | ||
| 143 | identifier gives the chronological sequence of events in the input stream | ||
| 144 | for 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 | ||
| 154 | attached 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 | ||
| 157 | attached 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 | |||
| 161 | If you're unsure as | ||
| 162 | to what a certain symbol means, you can also mouse over it in the visualizer | ||
| 163 | and read the description at the bottom of the screen. | ||
| 164 | |||
| 165 | Also, a note about the `Scheduled` (and `Priority Inversion`) events: each of these events actually | ||
| 166 | corresponds to two events in the input stream. Namely, a `Scheduled` event is really a `Switch To` | ||
| 167 | event 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 | ||
| 169 | being scheduled and being descheduled, respectively. <i>However</i>, if the visualizer module | ||
| 170 | finds a start event but not an end event (or vice-versa), it assumes that the corresponding | ||
| 171 | event occurred, but at a time not in the input stream. | ||
| 172 | In other words, it assumes that such events are genuine. To represent this phenomenon, | ||
| 173 | the visualizer shows the bar going "off the graph". | ||
| 174 | |||
| 175 | Interacting with the visualizer is easy. The scrollbars work in the obvious way. You can also | ||
| 176 | use the arrow keys to move, or use Ctrl+arrow keys to move faster. Mousing over an event gives | ||
| 177 | a description of the event at the bottom. You can also click an event to | ||
| 178 | select it. Hold down Ctrl to select multiple events. You can also drag a box around multiple | ||
| 179 | events to select them. You can even combine this with the Ctrl key to select multiple | ||
| 180 | boxes of events in succession. Your selection is independent of the mode you are in -- | ||
| 181 | thus if you wanted to see e.g. what CPUs a task was running on from time A to time B, | ||
| 182 | you could just select all the events under the task in question in Task Mode and then | ||
| 183 | switch over to CPU mode. Right-click and you will get a context menu containing each event | ||
| 184 | you selected. Selecting an item in the menu gives you detailed information about the event | ||
| 185 | in its own window. | ||
| 186 | |||
| 187 | If you want to see what's happening at a certain time, but don't want to bother scrolling there | ||
| 188 | manually, you can select `View->Move to Time` and type in the time you want to move to. | ||
| 189 | |||
| 190 | You can also zoom by either going to `View->Zoom In/Out`, or by holding down Ctrl and scrolling | ||
| 191 | the mouse wheel. | ||
| 192 | |||
| 193 | To 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 ### |
| 151 | If you are interested in contributing to Unit-Trace, you probably ought to know a bit about its overall architecture. | 224 | If you are interested in contributing to Unit-Trace, you probably ought to know a bit about its overall architecture. |
| 152 | 225 | ||
| 153 | Generally speaking, each Unit-Trace submodules is a Python generator. It accepts a Python iterator object as input and returns a Python iterator | 226 | Generally speaking, each Unit-Trace submodule is a Python generator. It accepts a Python iterator object as input and returns a Python iterator |
| 154 | object as output. (You may want to look up the relevant Python terminology.) | 227 | object as output. (You may want to look up the relevant Python terminology.) |
| 155 | 228 | ||
| 156 | The 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 | 229 | The 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 |
