2.3   An Overview of WindView

2.3.1   Understanding Events

In WindView, an event is any action undertaken by a task or an ISR that can affect the state of the real-time system. WindView displays detailed information for each event (such as the action that occurred, the context in which the action occurred, and the object associated with the action). In addition, WindView tags certain events with either high-resolution timestamps or event sequence numbers.

The interactions of the tasks, objects, and interrupts in a real-time system result in context switches. When a context switch occurs, execution switches from one thread to another. At the default logging level, the CSE level, WindView shows only the context switches. You can configure WindView to show all task state transitions so that, for example, when a task goes from pended to active state, that event is logged and displayed. This is called task state transition event-logging level or TST level. Or you can configure WindView to show details of selected objects in instrumented libraries, also called additional instrumentation event-logging level or AIL level. Instrumented objects include semaphore gives and takes, message queue sends and receives, timer expirations, and signals, as well as task and memory activities.

2.3.2   The View Graph

The heart of WindView is the view graph. The view graph presents the event data you collect in a graphical format that allows you to see the interaction of the various contexts in your system over time. If you have already followed the steps in 2.2 Running WindView and collected your own event log, you will have a view graph similar to Figure 2-6.

If you skipped to this section to familiarize yourself with the view graph before preparing to collect your own data, your WindView installation includes several sample files of data that you can view immediately. Even if you have your own log to look at, you may also want to open a sample log to compare a large, complex log with the simple log you generated. Figure 2-7 shows the view graph that appears if you open installDir/host/src/windview/apilib/vxColor.wvr using Open from the main File menu.

First, compare Figure 2-6 or your graph generated with the WindView default settings to Figure 2-7 or your display of vxColor.wvr. Notice that Figure 2-6 is quite simple, showing only some plain vertical bars and a few icons corresponding to interrupts near the top of the graph. On the other hand, Figure 2-7 is much more complex. It includes many more tasks, many connections between tasks, and many event icons. Your basic event log was generated using CSE logging level. vxColor.wvr was collected using AIL logging level with tasks, semaphores, message queues, and watchdogs instrumented. For information about logging levels, see 3.2 Selecting a Logging Level. For information about additional instrumented libraries, see 3.3 Instrumented Objects.    

Try clicking on the various zoom buttons on the WindView toolbar, Zoom In ( ), Zoom Out ( ), and Zoom 100% ( ). Note that when you use to display the entire log on the view graph, the icons overlay each other and can't be distinguished. Click and drag over a dense portion of the view graph and then click . Your view immediately zooms in on the area you indicated. You may need to do this several times to clearly distinguish the icons.

The following paragraphs provide an overview of the view graph shown in Figure 2-7. The features of the WindView display are discussed in detail in 5. Data Display.

The view graph is a window into the event data. In most cases, it does not show the entire event log; instead, it shows a time interval. The title of each view-graph window indicates where the events displayed come from: either the name of a file (an event log) or the name of a target server. The file name appears in the upper left-hand corner of the view graph: vxColor.wvr. If you have not yet saved a view graph, the name of the target server appears instead of the file name.

Timeline
The timeline displays the time in seconds, or the sequence numbers, since event logging began.

Interrupt Levels
On the left side of the view graph, the interrupt levels used in this event log are listed in order, with the highest-level interrupt at the top.

Tasks
After the interrupt levels, tasks are listed with the highest priority task first, based on initial priority. Even if the priority of a particular task changes (due to a taskPrioritySet( ) or priority inheritance, for example), its vertical position does not change.

Idle Loop
The last thread of execution shown represents the kernel idle loop.

Status Bar
The status bar for each WindView view graph provides information about the time interval currently displayed in that view graph unless a specific context is selected. For a time interval, as shown in Figure 2-7, the status bar displays the lower and upper bounds and the duration of the interval. To see the status bar when a specific event is selected, see Figure 2-6.

Event Icons
Various icons indicate what type of event occurred at a given time.

State Stipples
These are horizontal lines that show the state of each task at a given time.

Analog Graph
An analysis pack is available to calculate the amount of memory usage (if you have collected memory data). Click the button to display the Analysis dialog box. Select the contexts you want to include in the analysis and click Perform. You can display the memory data in graph form below the main view graph by using the split box (see the upper right corner of Figure 2-7) to divide the view graph horizontally. (To see what the analog graph looks like, see Figure 5-11).