2

Event Dictionary



2.1    Introduction

This chapter provides a "dictionary" of the events collected by WindView. It lists each event by object type (message queue, semaphore, task, and so on), providing the following information for each:

  • The event icon.

  • The possible causes of the event, including which type of code (system, application, or ISR) could have caused it.

  • Any task state effects that can result from the event.

  • The information collected about the event for each event-logging level. (That is, the information displayed when you double-click on the event icon or otherwise inspect it with the Show Event dialog box; see the WindView User's Guide: Data Display for details on using this window.)

Figure 2-1 shows the paradigm that Wind River Systems used to create the default WindView icons.


*      
NOTE: The following are not supported by WindView (that is, they are not instrumented and so do not show up in a WindView event log): VxMP shared objects (shared semaphores and message queues), and VxWorks 4.0.x-style semaphores.    



2.2    Using the Event Dictionary

This section provides tips for using the event dictionary.

Suppose you see the icon while viewing an event log in WindView.

You can click on the icon to see the name of the event in the Tornado status line (at the bottom of the Tornado window; see the WindView User's Guide: Data Display). As an alternative, you can locate the icon in the Legend window under WindView Help in the main Help menu. In either case, you can see that this is the taskResume event icon. Using 2.3 Event Dictionary, you can look up the information on what can cause a taskResume event, what effect on the task state it may have, and what information is collected for a taskResume event, as shown in Figure 2-2.  

Figure 2-1:   Anatomy of an Event-Dictionary Entry

Most of the elements that are called out on the sample page are self-explanatory, with the possible exception of the table of information collected.

The table of information collected describes what information is logged for a particular event, and for which event-logging level that information is logged (indicated by X's in the appropriate columns):

  • Context switch event-logging level (CSE level)
  • Task state transition event-logging level (TST level)
  • Additional instrumentation event-logging level (AIL level)

In the sample event dictionary page above, you can see that the context (the task, ISR, or idle loop in which the event occurred), eventName, and taskId event parameters are logged when event logging is started at TST level.1

At this level, timeStamp is not actually logged. Instead, it is calculated based on the next exit from the kernel; for more information, see the WindView User's Guide: Configuring Data Collection.

These same event parameters are logged when event logging is started at AIL level, but in addition, the priority event parameter is logged, and the timeStamp is logged rather than calculated.

For example, if event logging is at TST level, when you inspect the taskResume icon with the Show Event dialog box, a display like Figure 2-2 appears (note that although the priority label is present, its value is unknown, indicated by "?").  

Figure 2-2:   Inspecting taskResume Event

This provides the following information:

[1] At calculated time 0.0336625 seconds,

[2] within the context of tWdbTask (context ID 0x3fe9742 ), a taskResume event occurred.

[3] The priority of the resumed task is not known for this -logging level.

[4] The task being resumed has an ID of 0x33b6a7c, displayed here both as taskId in the Parameters area, and in the Object field (because this task is the object affected by the event).

However, if event logging is at AIL level, and task tWdbTask is instrumented, the Time field shows an exact timestamp, and the priority property displays the task priority for the affected task.


*      
NOTE: Remember that another important distinction between TST level logging and AIL level logging is that for the former, events are logged and displayed only if they result in a task state transition. At AIL level, all events are logged and displayed for all objects that are instrumented.


*      
NOTE: If an invalid parameter is passed to a routine, an event icon may not appear, depending on whether the error is detected before or after event logging occurs. In particular, if an invalid object ID is passed to a routine, the event icon does not appear.



2.3    Event Dictionary

Exception and ISR

      exception -- program error

A program error generated an exception (such as divide by zero, or a bus or address error) to which only the default exception handler has been attached.

The task that was executing when the exception occurred makes a transition to the suspended state, and a context switch occurs. If an ISR was executing when the exception occurred, the system reboots.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time :  
3.749262
The time at which the event occurred
X
X
X
context
Context : tLogTask (0x3a468c) 
The context in which the event occurred
X
X
X
eventName
exception (60)
The name of the event associated with this icon
X
X
X
vector
vector : 0x5
This exception's vector number; number is architecture-dependent
X
X
X

  intEnt -- entry to ISR

A hardware interrupt occurred for which there is an associated ISR. Interrupts not connected to the associated ISR by the intConnect( ) routine are not instrumented.

If the interrupt occurs in the context of an executing task, the task is displayed as making a transition to the ready state when the ISR starts executing.

VxWorks routines called from an ISR may be deferred to the interrupted context, if the interrupted context was doing kernel work at the time it was interrupted.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time : 0.669146
The time at which the event occurred
X
X
X
context
Context :  
INT 3 (0x3)
The context in which the event occurred
X
X
X
eventName
intEnt-3 (105)
The name and INT level of the event associated with this icon; the internal event number = 102 + INT level
X
X
X


*      
NOTE: The display of this icon is suppressed by default; to display it, toggle the Interrupts button in the Filter Events/State dialog box.


*      
NOTE: For some PowerPC targets the interrupt levels shown by WindView do not match the actual levels. This is because the PowerPC 860 interrupt controller has sixteen interrupt levels, INT0-INT15, one of which has a sublevel of 32 CPM interrupts, CPM0-CPM31. Because WindView can show only one kind of interrupt, it represents the CPM interrupts as INT32-INT63.

intExit -- exit from ISR

The ISR finished executing.

When this ISR finishes executing, control returns to the interrupted context. If the interrupted context was a task, then the highest-priority ready task makes a transition to the executing state.

VxWorks routines called from an ISR may be deferred to the interrupted context, if the interrupted context was doing kernel work at the time it was interrupted.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time : 0.671482
The time at which the event occurred
X
X
X
context
Context :  
INT 5 (0x5)
The context in which the event occurred
X
X
X
eventName
intExit (101)
The name of the event associated with this icon
X
X
X

 


*      
NOTE: The display of this icon is suppressed by default; to display it, toggle the Interrupts button in the Filter Events/State dialog box.

Memory Library

  memPartAddToPool-- add memory to a memory pool

System or application code called the memAddToPool( ) or the memPartAddToPool( ) routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

eventName
memPartAddtoPool (nnnnn)
The name of the event associated with this icon
X
timeStamp
Time : 0.669146
The time at which the event occurred
X
poolSize
poolSize=0x200
Amount of memory added to pool
X
partId
partId=0x80373600
ID of memory partition
X

  memPartAlignedAlloc -- allocate memory

System or application code called the malloc( ), calloc( ), valloc( ), memAlign( ), memPartAlloc( ), or memPartAlignedAlloc( ) routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

eventName
memPartAlignedAlloc (nnnnn)
The name of the event associated with this icon
X
timeStamp
Time : 0.669146
The time at which the event occurred
X
nBytes
nBytes=0x60
Total amount of memory requested
X
nBytesPlusHeaderAlign
nBytesPlusHeaderAlign 
=0x68
Total amount of memory allocated
X
pBlock
pBlock=0x3bb7290
Pointer to memory block
X
partId
partId=0x198118
ID of memory partition
X

  memPartCreate -- create a memory partition

System or application code called the memPartCreate( ) routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

eventName
memPartCreate (nnn)
The name of the event associated with this icon
X
timeStamp
Time : 0.669146
The time at which the event occurred
X
poolSize
poolSize=0x200
Size of pool allocated
X
partId
partId=0x80373600
ID of memory partition
X

  memPartFree -- free memory

System or application code called the free( ), cfree( ), or memPartFree( ), routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

eventName
memPartFree (nnnnn)
The name of the event associated with this icon
X
timeStamp
Time : 0.669146
The time at which the event occurred
X
nBytesPlusHeaderAlign
nBytesPlusHeaderAlign 
=0x78 
Total amount of memory allocated
X
pBlock
pBlock=0x8036e800 
Pointer to memory block
X
partId
0x8008f1ec 
ID of memory partition
X

  memPartRealloc -- reallocate memory

System or application code called the realloc( ) or memPartRealloc( ) routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

eventName
memPartRealloc (nnnnn)
The name of the event associated with this icon
X
timeStamp
Time : 0.669146
The time at which the event occurred
X
nBytes
nBytes=0x140
Total amount of memory requested
X
nBytesPlusHeaderAlign
nBytesPlusHeaderAlign 
=0x1a0
Total amount of memory allocated
X
pBlock
pBlock=0x803736c0
Pointer to memory block
X
partId
partId=0x80373600
ID of memory partition
X

Message Queue

msgQCreate -- create a message queue

System or application code called the msgQCreate( ) routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time :  
0.011881
The time at which the event occurred
X
context
Context : t2 
(0xf9ace) 
The context in which the event occurred
X
eventName
msgQCreate (10020)
The name of the event associated with this icon
X
msgOptions
msgOptions : 
MSG_Q_FIFO
Message queueing options: MSG_Q_FIFO or MSG_Q_PRIORITY
X
maxMsgLen
maxMsgLen : 0x14
Maximum possible length, in bytes, of each message in this message queue
X
maxMsg
maxMsg : 0xa
Maximum number of messages this message queue can hold
X
msgQId
msgQId : 0xfff2308
ID of the created message queue
X

msgQDelete -- delete a message queue

System or application code called the msgQDelete( ) routine.

System code uses message queues for the following reasons (for information on TFTP, the exception task, and the logging task, see the VxWorks Programmer's Guide):

  • The TFTP server uses message queues to manage the pool of available reply descriptors.
  • A message queue is created for communication with the exception task (tExcTask).
  • A message queue manages the messages to be logged with the logging task (tLogTask).

Any tasks pending on the message queue make a transition to the ready state. If one of the tasks is the highest-priority ready task in the system, a context switch occurs.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time :  
0.011881
The time at which the event occurred
X
X
context
Context :  
task3 (0x3d0218) 
The context in which the event occurred
X
X
eventName
msgQDelete (10021)
The name of the event associated with this icon
X
X
msgQId
msgQId : 0x3e03a8
ID of the message queue to delete
X
X

msgQReceive -- receive a message from a message queue

System or application code called the msgQReceive( ) routine.

System code uses message queues for the following reasons (for information on TFTP, the exception task, the logging task, and pipes, see the VxWorks Programmer's Guide):

  • The TFTP server uses message queues to manage the pool of available reply descriptors.
  • A message queue is created for communication with the exception task (tExcTask).
  • A message queue manages the messages to be logged with the logging task (tLogTask).
  • Message queues are used by pipe operations.

If no message is available in the specified message queue, the task makes a transition to the pended state and a context switch occurs.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time : 4.6377312
The time at which the event occurred
X
X
context
Context :  
task3 (0x3e0218) 
Context in which the event occurred
X
X
eventName
msgQReceive (10022)
The name of the event associated with this icon
X
X
timeout
timeout : 
WAIT_FOREVER
Number of ticks that the task is to wait (pend) for a message, or NO_WAIT or WAIT_FOREVER
X
bufSize
bufSize : 20
Size of the buffer to receive message
X
buffer
buffer : 0xffe770
Address of buffer to receive message
X
msgQId
msgQId : 0x3e03a8
ID of the message queue from which to receive the message
X
X

msgQSend -- send a message to a message queue

System code, application code, or an ISR called the msgQSend( ) routine.

System code uses message queues for the following reasons (for information on TFTP, the exception task, the logging task, and pipes, see the VxWorks Programmer's Guide):

  • The TFTP server uses message queues to manage the pool of available reply descriptors.
  • A message queue is created for communication with the exception task (tExcTask).
  • A message queue manages the messages to be logged with the logging task (tLogTask).
  • Message queues are used by pipe operations.

If tasks are pended on the message queue, the first task that called msgQReceive( ) or the highest-priority task (depending on the message queue creation option) makes a transition to the ready state. If it is the highest-priority task in the system, a context switch occurs.

If the message queue is full, and the sending task has specified a timeout, then it makes a transition to the pended state and a context switch occurs. (ISRs must specify NO_WAIT as the timeout value.)




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time : 4.6366938
The time at which the event occurred
X
X
context
Context :  
t2 (0x3dd918) 
The context in which the event occurred
X
X
eventName
msgQSend (10023)
The name of the event associated with this icon
X
X
msgPriority
priority : MSG_PRI_NORMAL
Priority of the message being sent: MSG_PRI_NORMAL or MSG_PRI_URGENT
X
timeout
timeout : WAIT_FOREVER
Number of ticks that the task is to wait (pend) for free space if the message queue is full, or NO_WAIT, or WAIT_FOREVER
X
bufSize
bufSize : 28
Length of the message to be sent
X
buffer
buffer : 0xf9ca5c
Address of the buffer holding the message to be sent
X
msgQId
msgQId : 0x3e03a8
ID of the message queue to which to send the message
X
X

Semaphore

semBCreate -- create a binary semaphore

Application code called the semBCreate( ) routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time :  
0.033995
The time at which the event occurred
X
context
Context :  
tLogTask (0x3a3964) 
The context in which the event occurred
X
eventName
semBCreate  
(10008)
The name of the event associated with this icon
X
semValue
semValue : 0x3a3964
The ID of the task that owns the semaphore or NULL
X
semOptions
options : SEM_Q_FIFO
Semaphore queueing option: SEM_Q_PRIORITY or SEM_Q_FIFO
X
semId
semId :  
0x3fd900
ID of the created binary semaphore
X

semCCreate -- create a counting semaphore

Application code called the semCCreate( ) routine.

None.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time :  
0.033973
The time at which the event occurred
X
context
Context : tLogTask (0x3a3964) 
The context in which the event occurred
X
eventName
semCCreate (10009)
The name of the event associated with this icon
X
semValue
semValue : 0
Initial count of the semaphore
X
semOptions
options : SEM_Q_FIFO
Semaphore queueing option: SEM_Q_PRIORITY or SEM_Q_FIFO
X
semId
semId :  
0x3a0fa4
ID of the created counting semaphore
X

semDelete -- delete a semaphore

System or application code called the semDelete( ) routine. (System code issues this routine from the TFTP library only.)

The following system tasks create and use mutex semaphores (for information on these facilities, see the VxWorks Programmer's Guide):

  • The FTP server daemon task.
  • The TFTP server task.

In addition, system code creates and uses these mutex semaphores:

  • The volume-locking semaphore in the dosFs file system.
  • The volume-locking semaphore, the fd-access semaphore, and each fd's semaphore in the raw file system.
  • The volume-locking semaphore in the RT-11 file system.
  • The object module management semaphores.
  • The network mutual exclusion semaphore.

Tasks pending on the semaphore make a transition to the ready state. If one of the unblocked tasks is the highest-priority ready task in the system, a context switch occurs.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time :  
0.033731
The time at which the event occurred
X
X
context
Context : tLogTask (0x3a3964) 
The context in which the event occurred
X
X
eventName
semDelete (10010)
The name of the event associated with this icon
X
X
semId
semId : 0x3a0fa4
ID of the semaphore to delete
X
X

semFlush -- flush a semaphore

System code, application code, or an ISR called the semFlush( ) routine. (System code only issues this routine from the TFTP library.)

Tasks pending on the semaphore make a transition to the ready state. If one of the unblocked tasks is the highest-priority ready task in the system, a context switch occurs. Note that the semFlush( ) routine is illegal for mutual exclusion semaphores.




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time :  
0.033633
The time at which the event occurred
X
context
Context : tLogTask (0x3a3964) 
The context in which the event occurred
X
eventName
semFlush  
(10011)
The name of the event associated with this icon
X
semId
semId :  
0x3a0f54
ID of the semaphore to flush
X


*      
CAUTION: At AIL level, a semaphore flush stores in the event log not only the semFlush event itself, but also a semGive for every task that was pended on the semaphore. At TST level, only the semFlush event appears.

semGive -- give a semaphore

System code, application code, or an ISR called the semGive( ) routine. (An ISR cannot give a mutual exclusion semaphore.)

WindView system code creates and uses a binary semaphore to manage the target event buffer.

The following system tasks create and use mutex semaphores (for information on these facilities, see the VxWorks Programmer's Guide):

  • The FTP server daemon task.
  • The TFTP server task.

In addition, system code creates and uses these mutex semaphores:

  • The volume-locking semaphore in the dosFs file system.
  • The volume-locking semaphore, the fd-access semaphore, and each fd's semaphore in the raw file system.
  • The volume-locking semaphore in the RT-11 file system.
  • The object module management semaphores.
  • The network mutual exclusion mechanism.
  • The memory management mechanism.
  • The serial devices management mechanism (tyLib).

For binary semaphores, if tasks are pended on the semaphore, the first task that called semTake( ) or the highest-priority task (depending on the semaphore create option) makes a transition to the ready state. If it is the highest-priority task in the system, a context switch occurs. If there are no tasks pending on the semaphore, the semaphore becomes full (no effect on task state).

For counting semaphores, if tasks are pended on the semaphore, the first task that called semTake( ) or the highest-priority task (depending on the semaphore create option) makes a transition to the ready state. If it is the highest-priority task in the system, a context switch occurs. If there are no tasks pending on the semaphore, the count of the semaphore is incremented (no effect on task state).

For mutual exclusion semaphores, if the number of gives equals the number of takes, the first task that called semTake( ) or the highest-priority task (depending on the semaphore create option) makes a transition to the ready state. If it is the highest-priority task in the system, a context switch occurs. Otherwise, the semaphore count is decremented (no effect on task state).




Event Parameter


Sample Data


Description
C
S
E
T
S
T
A
I
L

timeStamp
Time : 0.014918
The time at which the event occurred
X
X
context
Context :  
t2 (0x3dd918)
The context in which the event occurred
X
X
eventName
semGive (10012)
The name of the event associated with this icon
X
X
recurse
recurse : 0
For mutual exclusion semaphores, the number of gives that must occur before this semaphore is released
X
semValue
semValue :  
0x33dd918
The value before the semGive, as follows:
For a binary semaphore, the ID of the current task or NULL
For a counting semaphore, the current count
For a mutex semaphore, the ID of the task that owns this semaphore or NULL
X
semId
semId : 0x3a0f54
ID of the semaphore to give
X
X