WR System Viewer Users Guide 3.2
WR System Viewer Users Guide 3.2
Wind River
®
System Viewer
USER'S GUIDE
3.2
Copyright © 2009 Wind River Systems, Inc.
All rights reserved. No part of this publication may be reproduced or transmitted in any
form or by any means without the prior written permission of Wind River Systems, Inc.
Wind River, the Wind River logo, Tornado, and VxWorks are registered trademarks of
Wind River Systems, Inc. Any third-party trademarks referenced are the property of their
respective owners. For further information regarding Wind River trademarks, please see:
http://www.windriver.com/company/terms/trademark.html
This product may include software licensed to Wind River by third parties. Relevant
notices (if any) are provided in your product installation under the following directory:
installDir/product_name/3rd_party_licensor_notice.pdf.
Corporate Headquarters
Wind River Systems, Inc.
500 Wind River Way
Alameda, CA 94501-1153
U.S.A.
For additional contact information, please visit the Wind River URL:
http://www.windriver.com
For information on how to contact Customer Support, please visit the following URL:
http://www.windriver.com/support
10 Nov 09
Part #: DOC-16378-ND-00
Contents
1 Overview ............................................................................................... 1
2 Familiarization ...................................................................................... 5
iii
Wind River System Viewer
User's Guide, 3.2
iv
Contents
6.5 Socket Via TSFS and Socket Via TCP/IP Configuration ................................ 37
v
Wind River System Viewer
User's Guide, 3.2
vi
Contents
12 Timestamps .......................................................................................... 63
13 Triggering ............................................................................................. 67
vii
Wind River System Viewer
User's Guide, 3.2
viii
Contents
15.1 Configuring Wind River Linux for System Viewer ......................................... 109
15.4 Custom Events for Wind River Linux 3.0 .......................................................... 118
Sample Marker File .................................................................................. 118
Enabling Custom Markers ...................................................................... 118
Method 1: On the Target Shell ................................................. 118
Method 2: In the Configuration File ....................................... 119
15.5 Custom Events for Wind River Linux 2.x .......................................................... 120
15.5.1 General Steps for Using Custom Events ............................................... 122
15.5.2 Marker Example Module ........................................................................ 122
ix
Wind River System Viewer
User's Guide, 3.2
x
Contents
xi
Wind River System Viewer
User's Guide, 3.2
xii
1
Overview
1
Wind River System Viewer
User's Guide, 3.2
Use this to configure what you want logged, how to upload the log from the
target to the host, and to select how to view analysis data.
Triggering
Use this to precisely specify when (at which event) to start and stop logging.
Most events that are logged can also be used as a trigger.
Event Receive
NOTE: Triggering is not available for the operating system. For information
on creating custom events, see 15.5 Custom Events for Wind River Linux 2.x,
p.120.
2
1 Overview
1.2 System Viewer Tools
Visualizations
1
These include a graphical and tabular presentation of the all logged events , as
well as several views that show analyses derived from the log. These include
core usage (for example on multicore systems), memory data, state statistics,
system load, and so on.
3
Wind River System Viewer
User's Guide, 3.2
The host side functionaly is the main subject of the rest of this manual. The target
side includes instrumentation points, buffering, event logging, timestamping, data
upload, and triggering of actions such as when to start and stop logging. All of
these things can be individually configured from the host. For a detailed list of
which VxWorks components are needed for specific target side functionality, see
D. Configuring VxWorks for System Viewer. For information relating to , see
15. System Viewer for Wind River Linux.
Communication between the host and target uses the WDB protocol over a serial
line or a network connection. This path is shared by all Wind River Workbench
tools to communicate with a target.
4
2
Familiarization
5
Wind River System Viewer
User's Guide, 3.2
6
2 Familiarization
2.3 Navigating a Log
In addition to Primary Overviews, you can add overlays (right-click the Overview
and Select Overlay) to the Overview. These overlays are vertically compressed
visualizations of ready-made analyses that can help you quickly identify potential
problem areas. One such analysis is Memory Usage, another example is, in a
multicore environment, Core Usage. Very generally speaking, if there are areas in
a primary overview or in an overlay that look in some way conspicuous, these
might be worth investigating.
Having used the Overview to identify parts of the log that are potentially worth
investigating, you will want to focus on each of these areas in turn.
Initially, only the left (earliest) portion of the log is selected in the Overview (black
background). You can relocate the selection in several ways, including:
clicking into the Overview (the selected range centres around your click)
dragging the selected range 12
keyboard left/right arrows and page up/down
mouse wheel
various menu commands
To change the scope of the selection in the Overview, drag the left and/or right
margins (or use a Zoom context-menu command).
Notice that when you change the selection in the Overview, the displayed data in
the Event Graph (and Table) also changes to match the selected range in the
Overview.
The Event Graph plots events along a timeline (x-axis). The events are grouped by
context down the y-axis (the so-called Context Tree), whereby the contexts are
arranged by decreasing priority from top to bottom in the tree.
If you are not familiar with the icons and stipples used to depict events and states
in the Event Graph, select System Viewer > Open Legend.
The graph displays the events in the range selected in the Overview. Within this
range, you can define a so-called Measured Range. The quickest way to create such
a Measured Range in the Event Graph is to click into the graph and drag the
mouse. You can then, for example, right-click and Zoom to Measured Range.
Clicking anywhere into the graph will remove the Measured Range.
7
Wind River System Viewer
User's Guide, 3.2
The Event Table (on the tab behind the Event Graph) tabulates events in order of
occurrence in the range selected in the Overview. Within this range, you can, like
in the Graph, define a Measured Range. The quickest way to create a Measured
Range in the Event Table is to click on an event, then shift-click on another event.
You can highlight an individual event (set the Event Cursor) by double-clicking on
it; this also shows the Event Properties.
Selecting nodes in the Context Tree to the left of the table constrains the displayed
events to those that belong the selected context. If no nodes are selected, or if the
topmost node is selected, all events are displayed.
Over and above range-selection as described above, there are various other things
you can do to further unclutter and clarify displayed data.
You can Crop the Overview to your selection.
This zooms the Overview in so that your selection occupies the entire available
space in the Overview (you can right-click and Remove Cropping at any
time).
In the Context Tree, right-click and select Hide Inactive.
This will hide contexts that do not have any associated events.
You might find it helpful to unnest nested contexts in the Event Graph’s
Context Tree. To do so, right-click in the tree and select Show as Flat Tree.
Use filters to hide data that you are not interested in, see 11. Filtering and
Searching.
8
2 Familiarization
2.3 Navigating a Log
You can open any number of different analyses as tabs in the main Workbench
editor panel by selecting System Viewer > Analysis Types. However, it is often
more useful to see different analyses in conjunction, to do so select
System Viewer > Open Linked View.
Anything you do in any one of the open views (selection, bookmarking, filtering,
and so on) will be reflected in all the other views that are open on the log.
General handling and selection techniques within the various graphs and tables
are the same as those described above in the context of the Event Graph and the
Event Table.
The choice as to which analysis views you open will obviously depend on the
problems you are trying to solve; if you noticed anomalies in Overview overlays
(2.3.1 Preliminary Analysis in the Overview, p.6) you will probably open the
associated analyses for a closer look.
Depending on the view you are looking at, using different filters can prove useful. 12
For example, if you are investigation memory leaks, you could link to the
Memory Usage analysis, and then filter out everything except memory events.
To set bookmarks, right-click into any open analysis view and select
Add Bookmark. The bookmark is tied to a timestamp and will appear as a blue
triangle at the selected timestamp in all views.
Because bookmarks are persisted in saved analyses, they are particularly useful if
you intend to work in multiple sessions, or make your analysis available to others
for further investigation.
System Viewer log files have either a .wvr extension, which is a so-called raw
file with log data only, or a .wva extension, which is an analysis file that
includes information on how the previous viewing session was configured
(range selection, bookmarking, filtering, and so on) so that you (or somebody
else) can pick up from where you left off.
9
Wind River System Viewer
User's Guide, 3.2
10
3
Configuring a Logging Session
11
Wind River System Viewer
User's Guide, 3.2
above the volume of data collected, the selected Upload Mode and associated
buffering also influences intrusiveness.
Each of the nodes (configuration categories) introduced below is individually
discussed later. The following is intended merely as an overview that also
illustrates a few potential inter-category dependencies.
The topmost node, Configuration Summary, is a read-only summary of the
the configuration settings in the other nodes below it. If everything looks
correct here, forget about the rest of the nodes and start logging.
The Event Logging Level node—How much information do you want to
collect? What do you want log?
Deciding what you want to log seems a logical enough place start any
configuration work.
Furthermore, because real-time debugging with the System Viewer can, like
any other kind of debugging, often be a question of “homing in” on the
problem (or on different problems in succession), this is also the configuration
category you are most likely to want to revisit.
Modifications to the scope and type of data you want to collect can, in turn,
influence your decisions in the next node down, Upload Mode.
The Upload Mode node—When do want to upload the log? How will it be
buffered on the target until that time?
If, for example, your application can be expected to generate huge amounts of
data at the Event Logging Level you selected above, this can influence your
decisions on buffer allocation.
Apart from the expected data volume, the type of problem you are interested
in (which you will also have thought about in the context of selecting an
Event Logging Level) will have an effect on Upload Mode settings.
For example, do you want to see the events immediately preceding (and
precipitating) a crash? Or, for example, are you interested in observing
long-term target behavior?
The Upload Method node—How do host and target communicate? Where do
you want the target to put the logs on the host file system?
This last node is mostly about aligning host and target communication settings
(whereby the System Viewer can only use what is available on the target) and
where you want the logs to be uploaded to. Once everything is correct on this
bottom node, you will normally not need to modify this configuration
12
3 Configuring a Logging Session
3.2 Beyond the Basics
13
Wind River System Viewer
User's Guide, 3.2
14
4
The Event Logging Level
15
Wind River System Viewer
User's Guide, 3.2
To help you decide which level to select, use your knowledge of:
16
4 The Event Logging Level
4.2 What is an Event Logging Level?
your application and its (potential) problem areas
how your application interacts with the operating system
If this not enough, you might try an iterative approach, especially if you are new
to System Viewer:
Start by collecting at the most simple level, Context Switch, then, after you 4
have done the rest of your configuration settings and have generated a log,
examine the results in the Log Viewer.
If you do not see what you need, try the next highest level,
Task State Transition.
The Task State Transition level captures, in addition to the changes in
execution context logged by the Context Switch level, the events that resulted
in such changes.
If that does not work for you, move up to the highest level,
Additional Instrumentation.
The Additional Instrumentation level is configurable and allows logging of
selected operating system specific event types. Try to narrow down your
selection to likely looking candidates for the problem(s) you are interested in.
Note, however, that if you do not select any libraries, the output will be exactly
the same as if you had selected Task State Transition.
17
Wind River System Viewer
User's Guide, 3.2
18
5
The Upload Mode
19
Wind River System Viewer
User's Guide, 3.2
This is the default mode. Data is uploaded when you issue an Upload command
from the System Viewer user interface.
If you use a non-circular buffer, logging stops when the buffer is full.
Deferred Upload Limitations
20
5 The Upload Mode
5.2 Deferred Upload Or Continuous Upload?
In such a case you might set triggers to start/stop logging, and you would
probably also be able to constrain the volume of data collected via the
Event Logging Level configuration.
– You have additional off-board memory.
Deferred Upload Advantages
In this mode, data is periodically uploaded from the target as buffers are filled.
Logging continues until stopped by a trigger, an API call, or on demand. If the
Upload Method is configured to
Automatically view the data on upload completion, uploading takes place as
soon as logging is stopped.
Continuous Upload Limitations
This mode is more complex than Deferred Upload in that, over above
collecting data and allocating buffers, it has to concurrently upload filled
buffers (and potentially free them). This has a number of implications:
– More complexity may, but by no means necessarily, lead to problems and
therefore also some additional configuration overhead.
– Intrusiveness is higher because events associated with periodic uploading
are reflected in the log.
– Periodic uploading impacts target performance.
– This mode is not compatible with the host-driven Memory Read upload
method, see 6.2 Using the Memory Read Upload Method, p.34.
Continuous Upload Advantages
The major advantage, or reason to use, the Continuous Upload mode is the
huge volume of data you can collect without interruption (the physical limit is
the available hard-disk space on the host).
For long-term, uninterrupted observation and situations where you do not
know how to characterize the problem (and therefore cannot set triggers) this
is the mode of choice.
21
Wind River System Viewer
User's Guide, 3.2
Both Deferred Upload and Continuous Upload modes provide the following
configuration options:
Buffer size (default = 32Kb)
This refers to the size of individual buffers in a dynamic ring of multiple
buffers. The smallest possible value (the default of 38Kb) therefore represents
the best fit in terms of how many individual buffers the available target
memory can accommodate.
If target memory constraints are not an issue because the expected volume of
data is relatively low and/or you have ample free target memory, you can
increase the size of individual buffers. Because buffers are dynamically
allocated (and in Continuous Upload mode also sometimes freed), this will
reduce the overhead, and therefore also intrusiveness, of memory
(de-)allocation.
Advanced >>
This button opens options that you do not normally need to look at. These
options are relevant only for troubleshooting or advanced tweaking; as such,
they are described under 5.4 System ViewerTroubleshooting Upload Modes, p.27.
22
5 The Upload Mode
5.3 Post-Mortem Upload Modes
You can also use Post-Mortem Upload even if you do not expect the target to
crash. This is particularly useful on systems (like VxWorks 653) that do not support
Deferred Upload with the Use a circular buffer option. This way, you can take
advantage the corresponding circular (wrap-around) buffer feature used by
Post-Mortem. In this case, you would not need to rebuild the boot loader.
Because post-mortem mode must preserve the buffer after an application failure,
the buffer cannot reside in system memory. This means you will have to configure
the kernel accordingly, unless one of the following applies:
You are using a BSP that does not reset system memory on a warm reboot.
You are using shared or off-board memory.
If neither of the above apply, you will have to configure the kernel, regardless of
which post-mortem mode (on systems that provide more than one) you want to
use.
Your first step is therefore to open the Kernel Configuration Editor (accessing the
Kernel Configuration Editor and using the Find dialog to locate components is
described under D.2 Configuring the Kernel, p.152).
23
Wind River System Viewer
User's Guide, 3.2
How you proceed from here, depends on which mode (if your system provides
more that one) you want to use. Recall: both will achieve the same objective.
– Either follow the steps under Post-Mortem Upload Kernel Configuration, p.24
– Or follow the steps under Post Mortem Mode (using pmLib) Kernel
Configuration, p.25
To configure memory for Post Mortem Upload you have to set the following
macro values:
LOCAL_MEM_AUTOSIZE = FALSE
USER_RESERVED_MEM = required memory size (as large as possible)
To do so:
In the Kernel Configuration Editor’s Find dialog, start typing
LOCAL_MEM_AUTOSIZE.
The macro name should be matched after the first few keystrokes.
Double-click on the match and, in the Properties view, set the Value of
LOCAL_MEM_AUTOSIZE to FALSE.
Open the Find dialog again, and start typing USER_RESERVED_MEM.
The macro name should be matched after the first few keystrokes.
Double-click on the match and, in the Properties view, set the Value of
USER_RESERVED_MEM to as high a value as possible.
For example, to reserve 512 Kb of memory for the post-mortem log buffer, set
the value to 0x80000.
If you do not know how much memory is available for reservation, use a
Target or Host Shell and:
– To find the top of VxWorks memory, enter sysMemTop( )
– To find the top of all local memory, enter sysPhysMemTop( )
You have now reserved memory for the post-mortem log buffer. Please continue as
described under 5.3.3 Rebuild the Kernel and the Boot Loader, p.25
24
5 The Upload Mode
5.3 Post-Mortem Upload Modes
To configure memory for the Post-Mortem Upload (using pmLib) mode, you
have to set the macro:
PM_RESERVED_MEM = required memory size (as large as possible)
To do so:
5
In the Kernel Configuration Editor’s Find dialog, start typing
PM_RESERVED_MEM.
The macro name should be matched after the first few keystrokes.
Double-click on the match and, in the Properties view, set the Value of
PM_RESERVED_MEM to as high a value as possible.
For example, to reserve 512 Kb of memory for the post-mortem log buffer, set
the value to 0x80000.
NOTE: The size defined by the PM_RESERVED_MEM value is for the whole
arena, the amount of memory available for use by System Viewer depends on
the amount of memory used by other components in the arena such as ED&R.
You have now reserved memory for the post-mortem log buffer using the
persistent memory feature. Please continue as described under 5.3.3 Rebuild the
Kernel and the Boot Loader, p.25
If you have modified the kernel in order to support post-mortem upload, you have
to rebuild and reboot it.
Furthermore, unless you are using post-mortem as described under 5.3.1 Using
Post Mortem for Non-Fatal Problems, p.23, you will have to rebuild VxWorks boot
loader images. This is necessary to ensure that the boot process does not clear
memory reserved for the System Viewer log buffer or the system image, which
could lead to changes in memory allocations.
25
Wind River System Viewer
User's Guide, 3.2
Once you have configured the kernel as outlined under 5.3.2 Preparation: Kernel
Configuration for Post-Mortem Upload, p.23, you can select the Post-Mortem Upload
in the System Viewer Configuration editor.
Normally the start and end addresses displayed in the
Post-Mortem Upload Buffer Configuration pane can be correctly calculated by
System Viewer. If not, a warning is displayed. Possible problems include:
The target does not support user-reserved memory (for example, VxSim).
You have not correctly configured user-reserved memory on the kernel, see
Post-Mortem Upload Kernel Configuration, p.24.
26
5 The Upload Mode
5.4 System ViewerTroubleshooting Upload Modes
Logging stops prematurely.
In Continuous mode only:
– upload fails and/or
– there is excessive buffer allocation/freeing (known as thrashing)
Generally speaking, such extreme situations, where System Viewer defaults do not
suffice, arise if too many events are fired too rapidly to be properly handled. To
overcome the problem, there are two main areas to look at:
Constrain the volume of data collected by setting triggers (see 13. Triggering)
and/or by refining the Event Logging Level if possible (see 4. The Event
Logging Level).
Modify the target buffer configuration, which is what the rest of this section is
about.
27
Wind River System Viewer
User's Guide, 3.2
28
5 The Upload Mode
5.4 System ViewerTroubleshooting Upload Modes
This section focusses on logging problems where there is a good chance that some
upload-mode related re-configuration could provide a solution.
This is observable in the Log Manager (see 7.2 The Configuration Editor Log
Manager, p.42).
Although this could potentially happen in any mode, Continuous Upload is most
likely to be affected due to the additional overhead of concurrently uploading data.
Possible Causes
Possible Solutions
All modes:
Increase the buffer allocation task priority. You can do this either in the host or
target shell, or in the Kernel Configuration Editor (in which case you will
need to rebuild and reboot).
The default buffer allocation task priority is 100. So you would increase this to
some higher integer, say 150.
– To increase buffer allocation priority, in the host or target shell, enter:
-> wvRBuffMgrPrioritySet(150)
– To increase buffer allocation priority in the Kernel Configuration Editor,
search for WV_RBUFF_MGR_PRIORITY and enter a value of, say, 150.
Post-Mortem modes:
Allocate more user-reserved or persistent memory (depending on mode used)
if possible, see 5.3.2 Preparation: Kernel Configuration for Post-Mortem Upload,
p.23.
29
Wind River System Viewer
User's Guide, 3.2
30
5 The Upload Mode
5.4 System ViewerTroubleshooting Upload Modes
Possible solution: Click Advanced >> and increase Max. Buffer Count (the
default is 10).
The upload task priority is not high enough; that is, higher-priority tasks
execute so frequently that they prevent uploading (rare).
Possible solution: Use wvUploadTaskConfig( int stackSize, int priority) to
change the priority (do not modify stackSize).
5
The default upload task priority is 150. So you would increase this to some
higher integer, say 200.
To increase upload task priority, in the host or target shell, set the second
parameter of wvUploadTaskConfig to, say, 200:
-> wvUploadTaskConfig(5000, 200)
In a balanced system, the ring buffer is not constantly resized; it remains at the
original, minimum ring size (Min. Buffer Count in the
Advanced Buffer Configuration), allowing a steady upload of event data. All
remaining buffers up to Max. Buffer Count should serve only as a reserve for
temporarily holding any upload-backlog induced by sudden, massive bursts of
data.
Thrashing refers to a situation where buffers are repeatedly allocated and freed.
This interferes with target performance and generates intrusive event data, which
will be reflected in the log.
Possible Solution
If you notice the behavior described above in the Log Manager, increase the
minimum number of buffers in the ring:
Click Advanced >> and increase Min. Buffer Count (the default is 2).
31
Wind River System Viewer
User's Guide, 3.2
32
6
The Upload Method
33
Wind River System Viewer
User's Guide, 3.2
Socket Via TCP/IP
File Via TSFS
File Via NFS
File Via netDrv
If you see a red X icon against the Upload Method node in the tree at the left, it
means that the current Upload Method Selection is invalid; uploading of log files
is therefore disabled.
The error can be due to one or more of the following (the user interface will tell you
which of these applies):
The target does not support the selected communication option.
If you want to use such an option, see D. Configuring VxWorks for System Viewer
for information about how to add the necessary components.
The Upload Method Selection configuration parameters have not yet been
validated by System Viewer.
Click the Apply button.
The Upload Method Selection is incorrectly configured.
See the user interface descriptions and the notes below.
34
6 The Upload Method
6.3 Using TSFS Upload Methods
That is, the low priority upload task which is normally responsible for
uploading System Viewer logs is not used, there is therefore no risk of it being
starved of CPU time by other, higher priority tasks.
The log can be transferred as many times as needed (as long as the option to
delete the log on the target is not selected) to any host directory.
The host knows exactly where the log will end up when transfer is complete.
Logs can be transferred without needing to call any target functions.
6
Configuration is easy: Enter a filename and directory for storing the
System Viewer log(s) on the host, and set the other options as desired.
NOTE: The Memory Read method is not compatible with the Continuous Upload
mode, see 5.2.2 Continuous Upload, p.21. The log must be complete and static before
a Memory Read transfer can begin.
35
Wind River System Viewer
User's Guide, 3.2
If you use Socket upload methods, you set the host file system location for the
uploaded log in the File Name field.
– If the target uploads data to a remote host, you would open the
Event Receive utility on that host, and set the information there (see
6.9 The Event Receive Utility, p.39).
– If the target uploads data to the current host, you can set this directly in the
System Viewer Configuration editor, without having to open the
Event Receive utility.
If you use File upload methods, you set the host file system location for the
uploaded log in the Directory containing uploaded log field:
This option is only available if the
Automatically view log on upload completion checkbox is selected. The
directory must be a path the host can follow to access the target's output file.
For example, if you are running System Viewer on a Windows machine and
the target in use is writing to a Unix machine, you have to map a Windows
network drive that allows you to set a Windows path to the Unix directory
holding the target’s output file.
36
6 The Upload Method
6.5 Socket Via TSFS and Socket Via TCP/IP Configuration
The IP address or name of the host to which the data is to be uploaded. The
default is the name of the current host.
Specifying a remote host requires the Event Receive utility to be started on the
remote host and ready to accept data at the specified socket number, otherwise
validation of the upload method is not possible (see 6.9 The Event Receive 6
Utility, p.39).
Port Number
The socket port on the host to which the event log data is uploaded. The
default port number is 6164.
You can enter a relative path segment (optional) and filename. The path
segment, if used, will be relative to the target’s TSFS root directory path
(displayed further down in the current view).
Directory containing uploaded log
If the target’s current TSFS root directory (displayed above the field) is a path
that can be directly accessed by the current host, then enter the path exactly as
displayed, plus any relative path you entered in the TSFS path and filename
field. Otherwise, see 6.4 Automatic Upload of Logs, p.35.
37
Wind River System Viewer
User's Guide, 3.2
You can enter a relative path segment (optional) and filename. The path
segment, if used, will be relative to the target’s NFS directory.
Directory containing uploaded log
You can enter a relative path segment (optional) and filename. The path
segment, if used, will be relative to the target’s netDrv directory.
Host
This is for information purposes only. If no host name or IP address can be
determined, the upload method is not available for use.
38
6 The Upload Method
6.9 The Event Receive Utility
Specifies the path and filename to which log files are saved. The default is
userHomeDir/eventLog.wvr.
Port Number
Specifies the host TCP/IP port over which the Event Receive utility listens for
event data from the upload task. The default event port number for
Event Receive is 6164. If your target uses a different event port, specify the port
number in this field.
Increment Filenames
Multiple log files are distinguished with the naming pattern, filename.num.wvr,
whereby num is an integer incremented by one for each file. Although, you
cannot specify the num segment of the filename, you can influence the integer
at which it begins. If you select Overwrite Existing Files, the event receive
session begins numbering its log files at zero, and overwrites any files from
previous event receive sessions.
Overwrite Files
If not selected, the next free incremental number (files with increment numbers
already exist in the directory) is used.
39
Wind River System Viewer
User's Guide, 3.2
40
7
Logging and Uploading Data
41
Wind River System Viewer
User's Guide, 3.2
Triggering
With Triggering, you specify events and conditions that can be validated
and used to start and stop System Viewer logging. For more information,
see 13. Triggering.
Wind River System Viewer API
The Wind River System Viewer API is the most precise method to
determine when logging starts and stops. It is especially useful when there
is a lot of activity on the target. You can issue commands from the host
shell or include them in your application code. Although precise, this
method is more complex than Triggering. For more information, see
7.3 Using the System Viewer API to Control Logging, p.43.
Event Receive
The Event Receive dialog is used to receive data on a socket that is sent
from the target. For more information, see 6.9 The Event Receive Utility,
p.39.
If you prefer not to use a socket that listens to the target, you can also upload data
using a file with TSFS, NFS, or netDrv. For more information, see 6. The Upload
Method.
NOTE: After a target reboot, the target connection can be resumed automatically,
but the System Viewer has to be reconnected manually.
42
7 Logging and Uploading Data
7.3 Using the System Viewer API to Control Logging
Orange
Buffer has been allocated and is ready to be used.
Green
A green buffer indicates the buffer has been used. If the buffer is partially
green, the buffer is still being used and is not yet full.
Red
In post mortem or using a circular buffer, red indicates that the buffer contains
the oldest set of data and will be overwritten when the buffer currently in use
is filled.
7
Clicking the More Detail >> button provides further information related to the
buffer and its state. Note that the Bytes Read value is always zero in deferred or
post-mortem modes because no data is read from the buffer (uploaded).
These routines provide the easiest method to control logging. The wvOn( ) and
wvOff( ), routines are defined in usrWindView.c.
These routines start a typical instance of event logging and upload. Because these
routines are not used by Wind River System Viewer itself, you can safely modify
them to suit your specific needs. To start event logging use wvOn( ), then start the
target application. To close the host-target connection, use wvOff( ) on the target.
To examine the source code and how these routines are used, refer to
installDir/vxWorks-N.N/target/config/comps/src/usrWindView.c.
43
Wind River System Viewer
User's Guide, 3.2
Please see the VxWorks OS Libraries API Reference documentation for more
information on the following libraries that you can use for controlling
System Viewer:
rBuffLib
Provides functions to create and delete the ring buffers used to hold events.
wvLib
Provides the underlying functions to create System Viewer logs, start and stop
logging, and to control the amount of events stored.
wvNetDLib
Provides precise control over the events logged by the network stack.
The order in which you invoke these libraries is critical. You can also use the e( )
routine with System Viewer, which is documented in the reference entry for
dbgLib. For more information, see also B. Programming Data Collection.
44
7 Logging and Uploading Data
7.4 VxWorks Core Dump Log Upload
45
Wind River System Viewer
User's Guide, 3.2
46
8
Loading Log Files
In addition, System Viewer can automatically open a log file upon upload.
There are two ways to configure System Viewer to automatically open a log
file:
– In the Upload Method Configuration node of the
System Viewer Configuration editor, select
Automatically view log on upload completion. For more information,
see 6.1 The Upload Method, p.33.
47
Wind River System Viewer
User's Guide, 3.2
– In the Event Receive utility, select View Files Automatically. For more
information, see 6.9 The Event Receive Utility, p.39.
NOTE: If you are using triggering to start and stop System Viewer, the resulting
log file may not open automatically when System Viewer is stopped. Of course,
you must explicitly press upload if you are using deferred upload mode. If you are
using continuous mode, the log has been uploaded but it will not open until you
either refresh triggers or click Upload. For more information, see 5. The Upload
Mode and 13. Triggering.
When you open a System Viewer log, a load progress view appears. You can copy
and paste text from this view. The view remains open if there are fatal errors, in
which case your log file will not open for viewing.
A log can load successfully or with warnings. If there are warnings, it is possible
that the contents of the log will be truncated from the point where the warnings
were encountered.
A log file may fail to load for one of the following reasons:
1. The log file is not a System Viewer log file.
2. The log file does not exist.
3. The log file is from a target operating system not supported by the
System Viewer installation.
4. The log contains unknown events.
In the first three cases, the error is fatal and log loading cannot proceed. In the final
case, the log is loaded up to the point where the unrecognized event is
encountered.
48
9
Primary Overviews
49
Wind River System Viewer
User's Guide, 3.2
The selected Overview range (all modes) defines the scope of the display in all
Analysis views. This is introduced under 2.3.2 Range Selection in the Overview, p.7.
50
9 Primary Overviews
9.4 Event Intensity
10
51
Wind River System Viewer
User's Guide, 3.2
52
10
Analysis Types
53
Wind River System Viewer
User's Guide, 3.2
The Event Graph uses event icons and state stipples to identify elements in the graph.
The event icons indicate the type of event that occurred at a given time. The state
stipples are represented as horizontal lines and indicate the state of each task at a
given time. To see what the icons/stipples mean, select
System Viewer > Open Legend.
The Event Graph uses the following annotations to graphically visualize multicore
behavior (see Figure 10-1):
A colored underbar to the executing state line, where the color represents a
core number.
A number next to the underbar which also represents the core number
These features are only present in logs which contain data from more than one
core.
54
10 Analysis Types
10.3 Memory Usage
In Figure 10-1, above, you can see that core0 is executing task tShell0 which is
pre-empted by the higher priority task tLogTask. Since tShell0 remains runnable,
it migrates to run on core1.
55
Wind River System Viewer
User's Guide, 3.2
system. When the system is not idle at any given instant of time, core usage is
deemed to be 100%.
The set of values used to show the core usage is calculated by dividing the log into
a configurable number of sample periods. Each of the sample periods will be of
equal duration (with the exception of the first and last ones, which will typically
half as long in order calculate a crossing point). For each of the sample periods, the
time the idle task is “running” is calculated as a percentage of the sample period.
This value is then used to create a core usage percentage, which is given a time
value in the middle of the sample period.
You can influence sampling in two ways:
Set the number of samples
This will divide the log up into the specified number of sample periods (plus
two extra for calculation of initial and end value crossing-points)
Set the sample duration
From the start of the selected range, the log will be divided up into the
specified time slices of equal length. The end of the selected range will be the
point where the time at the end of the log is too small to fit into a full sample
period.
56
10 Analysis Types
10.6 System Load
a floating point value. In other words, the full load will always be the number of
cores in the system (and not 100%).
57
Wind River System Viewer
User's Guide, 3.2
58
11
Filtering and Searching
11.1 Filtering 59
11.2 Searching 60
11.1 Filtering
You can filter information displayed to focus only on specific tasks and events that
you want to study at a given time. When large numbers of events that are typically
generated in high volume, such as interrupt and network events, are viewed at low
zoom levels, they slow the redrawing of the viewing tools and can also obscure
other events. You can unclutter the display by filtering.
All views, including the Overview, reflect any filters you set. Filtering only affects
the displayed information, not the actual data stored in the log. To change
information that is actually logged, you have to change the event logging level or
the event libraries for which you enable logging. You would do this prior to
starting logging, see 4. The Event Logging Level.
The Event Graph/Table context menu provides context sensitive filters that let you
hide all instances of selected event(s) or, in multicore environments, CPU(s).
59
Wind River System Viewer
User's Guide, 3.2
You create your own filters by choosing System Viewer > Filter. This opens the
Filtering dialog box, where you can filter out anything from entire containers or
contexts, through event classes, to individual event types, and objects. In multicore
environments you can also selectively show/hide cores.
Clear the checkboxes of the things you want to hide (you can use the right-click
context menu to (de)select subtrees). Note that there is a dependency that flows
from left to right through the tabs; for example, if you deselect something on the
Container tab, anything on the Event or other tabs will also be hidden (regardless
of whether the checkbox is selected or not) if it is a member of a hidden container.
Once you have created filters, you can later access them by selecting
System Viewer > Filter/Search History. If a filter is active, this is indicated by an
icon in the status bar.
11.2 Searching
You create/run searches by choosing System Viewer > Search. This opens the
Search dialog box, where you can select anything from entire containers or
contexts, through event classes, to individual event types and objects. In multicore
environments you can also selectively choose which core(s) to include in your
search. On the Range tab, you can restrict the scope of your search to the selected
range in the Overview.
Select the checkboxes of the things you want to find (you can use the right-click
context menu to (de)select subtrees). Note that there is a dependency that flows
from left to right through the tabs; for example, if you deselect something on the
Container tab, anything on the Event or other tabs will not be matched (regardless
of whether the checkbox is selected or not) if it is a member of a hidden container.
Furthermore, if you have applied a filter (see 11.1 Filtering, p.59) the search applies
to the filtered display.
Once you have created searches, you can later access them by selecting
System Viewer > Filter/Search History.
When you run a search by clicking OK in the Search dialog box, the Analysis
Filter/Search view opens with a list of matched items. To navigate matches, you
can either use the arrow buttons at the top-right of the panel, or double-click on a
60
11 Filtering and Searching
11.2 Searching
match; this will position the Event Cursor to the matched item in the open analysis
views.
12
61
Wind River System Viewer
User's Guide, 3.2
62
12
Timestamps
12.1 Timelines 63
12.2 Timestamp Ticks 64
12.3 High-Resolution Timestamping 64
12.4 Sequential Timestamping 65
12.5 Custom Timestamp Drivers 65
12.1 Timelines
When you develop your application for a target with a supported timestamp
driver, the instrumented kernel uses timestamps. The instrumented kernel can tag
certain events with high-resolution timestamps, sequence numbers, or with user
defined timestamps. These events are then displayed in various views along a
timeline that shows when each event occurred, based on these timestamps.
63
Wind River System Viewer
User's Guide, 3.2
64
12 Timestamps
12.4 Sequential Timestamping
65
Wind River System Viewer
User's Guide, 3.2
66
13
Triggering
13.1 Introduction 67
13.2 Getting Started 68
13.3 Using Triggering 69
13.4 Creating and Running the Sample Triggers 76
13.5 Using Functions with Triggering 83
13.6 Importing Previous Version Trigger Files 88
13.1 Introduction
Triggering is an operating system feature that uses instrumented events, mostly
found at the same point in the code as System Viewer events. As an alterative to
the System Viewer Configuration utility, you can use triggering to start and stop
the logging process. More importantly, triggering allows you to precisely control
when and how to start and stop logging using instrumented events.
Most events that you can log can also be written to activate a trigger. Triggering,
specifies an action to be performed when a trigger is hit. You select the actions for
triggers that include controlling how System Viewer logs events.
67
Wind River System Viewer
User's Guide, 3.2
68
13 Triggering
13.3 Using Triggering
To understand simple conditional and chained triggers, create and run the sample
triggering examples in
installDir/workbench-N.N/wrsv/N.N/samples/vxworksN/triggering.
1. Re-create and run the simple conditional triggering example described in
13.4.1 Simple Conditional Trigger Example, p.76.
2. Extend the simple conditional trigger to include a trigger that is chained to it,
as described in 13.4.2 Chaining Simple Conditional Triggers Example, p.78.
As described in 13.5 Using Functions with Triggering, p.83, Triggering allows you to
use a function as a condition or as an action.
1. You can create a trigger defined with a Condition on Function. For more
details, see 13.5.1 Using a Function as a Condition, p.83.
13
2. You can create a trigger defined to use a function as an action. For more details,
see 13.5.2 Writing a Call Function as an Action, p.85.
3. Finally, you can create and upload triggers using the Triggering utility or the
triggering API. For more information, see C. Triggering API, which includes an
example for System Viewer logging described in 13.5.3 Starting and Stopping
System Viewer with User Events, p.86.
NOTE: An application loads events from the required dictionary, therefore if you
open triggering against a live target and the target dies, you can still use triggering
to create and edit triggers even with the target down.
69
Wind River System Viewer
User's Guide, 3.2
System Viewer scans the target for triggers, and displays the ones it finds in the
table.
You specify new triggers, edit triggers, set up conditions and actions for simple
and chain triggers using four panes in the Triggering Maintenance utility.
To Create a Trigger
70
13 Triggering
13.3 Using Triggering
trigger, the Object listbox displays any semaphores on the target. If you
created a semaphore on the shell as in,
% mySem = semBCreate()
type mySem in the listbox and triggering finds the appropriate semaphore for
you.
6. Check Disable trigger after firing if the trigger should be disabled after it
fires. System Viewer enables this feature by default. If you do not check this
box, your trigger remains active to continue firing when conditions are met.
71
Wind River System Viewer
User's Guide, 3.2
3. Select the matching criterion by choosing one of the operators from the
drop-down menu (==, <=, <, and so on).
4. Enter the constant value to test in the second text box. The value must be a
32-bit integer constant in either decimal or hexadecimal format.
The criteria specified for event, context, and object, conditions are tested for on
the target. If the criteria are met, triggering proceeds. For triggering examples
that use conditions, see 13.4.1 Simple Conditional Trigger Example, p.76 and
13.5.1 Using a Function as a Condition, p.83.
Step 4: Select Actions to be performed when the Trigger Conditions are Met
System Viewer performs actions on a trigger when that trigger is set and the
event occurs. You define trigger actions and their range from controlling
System Viewer to performing user-specific requests. These actions are
performed when the specification criteria are met, and any specified condition
is matched.
Select actions for the trigger as follows:
No Action
Select No Action when no action is taken on the trigger. For example, you can
use this option to:
fire the first in a sequence of chained triggers, where the first trigger has
no other purpose than to enable another trigger.
determine a specific event has occurred when the associated trigger fires.
The trigger is then disabled after it fires, and you can examine the
Triggering utility to see when it has fired.
use as a counting mechanism. If the trigger is not disabled after firing, you
can update the Triggering utility using the View menu and see a count of
the number of times the trigger has fired under Status. For more
information, see 13.3.3 Downloading and Running Triggers, p.74.
Select Start System Viewer Logging to start logging when the trigger fires and
Stop System Viewer Logging to stop logging when the trigger fires. For
examples that use triggers to start and stop logging, see 13.4.3 Chaining Triggers
for System Viewer Logging Example, p.80 and 13.5.3 Starting and Stopping
System Viewer with User Events, p.86.
72
13 Triggering
13.3 Using Triggering
Call Function
Select Call Function to call the specified function on the target with the given
integer parameter. Selecting Call Function enables two text box fields, where
the first field specifies the function name and the second field specifies an
integer argument to that function. For more information, see 13.5.2 Writing a
Call Function as an Action, p.85.
Taskstop
Select Taskstop to stop the task which is currently executing. You can resume
the task by using the taskResume comand on a shell.
Defer Action
Check Defer Action to defer the action until it is safe to execute the trigger
action. For example, suppose you wanted to make sure your action function
did not run within ISR or system context. In this case, check Defer Action, if
the function contains calls to any function that is not permitted in ISR context.
System Viewer indicates valid triggers in black text. Before using a trigger,
variables on which it depends, must be defined. Invalid triggers require that you
define variables before they can be used.
In the trigger list, a red text item relies on a target requirement that does not exist.
This is typically a variable that needs to be defined.
73
Wind River System Viewer
User's Guide, 3.2
When you point to the invalid item and pause briefly for the error information,
System Viewer indicates the reason why a red text item is invalid, through a
tooltip. After correcting the error, you can update the trigger by clicking the refresh
toolbar button.
After variables are defined and refreshed in the trigger list, the green GO toolbar
button indicates the triggers are validated and ready to download.
You must download a trigger to the target before you use it by clicking GO. Once
you download a trigger, the Target column indicates the status of that trigger,
changing from Not Set to ARMED, FIRED, COUNTING, and so on, as the trigger
runs.
74
13 Triggering
13.3 Using Triggering
Various icons in the Trigger column indicates the state of a trigger as follows:
Yellow
This icon indicates the trigger is on the host computer, valid and ready for
download. The GO button is enabled.
Red
This icon indicates the trigger is on the host computer, but not valid and cannot
be downloaded. The GO button is disabled.
Green
This icon indicates the trigger is downloaded to the target and ARMED. If you
are running triggering, the trigger fires when the conditions for firing are met.
If triggering stops before the trigger fires, this icon indicates that the last state
of the trigger is ARMED.
Gray
13
This icon indicates the trigger is downloaded to the target, but not FIRED
because it was initially DISABLED. If you are running triggering, the trigger
does not fire until it is enabled. If triggering stops before the trigger is ARMED
or FIRED, this icon indicates the last state of the trigger is DISABLED.
Gray with Check mark
This icon indicates the trigger is FIRED and now DISABLED. If you are
running triggering, the trigger is ARMED, has FIRED and has been disabled
because the Disable after fire option of the trigger was selected. The trigger
remains in this state until you click GO.
Yellow with 123
This icon indicates a COUNTING trigger. The trigger is FIRED, but has not
disabled because Disable after fire was not selected when the trigger was
defined. If you are running triggering, the trigger is ARMED, has FIRED and
continues to fire each time its firing condition is met. To update the value in the
Hit Count column, click View > Refresh.
75
Wind River System Viewer
User's Guide, 3.2
76
13 Triggering
13.4 Creating and Running the Sample Triggers
Choose == from the drop-down listbox
Enter 1 as the constant value
6. From Actions, define the trigger as follows:
Select Call Function in the drop-down listbox
Enter printf in the text box
Enter helloString in the argument text box
Check Defer action
7. As this simple trigger is not chained, from Chaining, select None from
Enable trigger.
8. Save your trigger using a unique name, other than those used in the samples
folder.
! WARNING: The type entered into the argument text box, in this case helloString,
must be a variable not an integer.
3. Select Triggering > Refresh, or click the Refresh toolbar button to validate the
trigger.
The string “hello” prints out. The trigger status is updated to show that it has
fired.
3. Click Select Triggering > Stop, or click the Stop toolbar button to download
the trigger..
77
Wind River System Viewer
User's Guide, 3.2
The process of chaining in System Viewer ensures triggers are fired in a certain
order.
Using helloGoodbye.trig in
installDir/workbench-N.N/wrsv/N.N/samples/vxworksN/triggering, this
example shows you how to create a simple set of chained triggers that print out
“hello” and “goodbye” based on the system variable vxTicks.
You can choose to load the example trigger and begin using it, or recreate the
trigger and save it under a different name. If you have not loaded
helloGoodbye.trig, create and define the trigger as follows.
78
13 Triggering
13.4 Creating and Running the Sample Triggers
8. Save your trigger using a unique name, other than those used in the samples
folder.
79
Wind River System Viewer
User's Guide, 3.2
3. Select View > Refresh, or simply click the Refresh button to validate the
trigger.
NOTE: You can use the shell to find the current value of vxTicks and reset the
values in the Trigger Maintenance Utility to be greater than the current value.
Otherwise, one or both triggers fire immediately and the log you collect is almost
empty.
To use triggering to collect a System Viewer log, you must define two triggers, one
having the action to start log collection and one with the action to stop log
collection. In most cases, triggers used to collect a System Viewer log are chained,
since the order of their firing is critical.
Using startStopwv.trig in
installDir/workbench-N.N/wrsv/N.N/samples/vxworksN/triggering, you can
create the sample triggers used to start and stop System Viewer logging.
80
13 Triggering
13.4 Creating and Running the Sample Triggers
You can choose to load the example trigger and begin using it, or recreate the
trigger and save it under a different name. If you have not loaded startStopwv.trig,
create and define the trigger as follows:
81
Wind River System Viewer
User's Guide, 3.2
2. Select View > Refresh, or click the Refresh button to validate the trigger.
82
13 Triggering
13.5 Using Functions with Triggering
are ready to begin System Viewer logging, enter the following in the Host
Shell:
-> foo=1
NOTE: When a triggering event fires, it is logged as an event in the System Viewer
log. A trigger can start or stop logging part way into a resulting log (for example, 13
25% into the resulting log). This facility is known as pre-triggering and results in a
record of the events on either side of a trigger firing event.
You can write and use a function specifically to test a condition. The function used
as a condition is executed during trigger evaluation if the criteria for event, context,
and object conditions are satisfied.
One technique is to write a function that fires after a specified time period, for
instance, by comparing the value of the system tick count against its value when
the trigger to start the sequence fired. A conditional function cannot be deferred.
83
Wind River System Viewer
User's Guide, 3.2
You must make the function available on the target and enter its function name as
the condition item. The function is executed if all of the criteria defined for the
trigger under Specification are met. Once the function executes, the trigger fires
only when the function returns the value specified by the constant value.
When calling a function as a condition, it is very important that the condition is
only to be used in conjunction with a specification that limits the number of times
the condition is tested. For example, if a condition function to test a semaphore is
written and is tested without a limiting specification, then the execution of the
conditional function will cause more events which will each cause the condition
function to be called. This nesting of calls will cause a race condition on the target
and will eventually lead to the target crashing.
NOTE: If you use a function as a condition, the trigger Specification must define
the Event as user#, and the Event ID as 10. See also 13.5.3 Starting and Stopping
System Viewer with User Events, p.86.
The format and content of the condition function must follow the syntax below:
int conditionFunction (void)
{
int returnValue;
*/ Function body */
...
return (returnValue);
}
84
13 Triggering
13.5 Using Functions with Triggering
The body of a function used as a condition cannot contain any function calls that
are not permitted in an ISR context. This is because, depending on the criteria
specified for event, context, and object conditions, the function provided could be
executed within an ISR. Therefore, unless the combination of trigger specifications
set in the event, context, and object fields guarantees that the function can only be
satisfied in task context, (for example, by setting Context to Any Task or to a specific
task) the body of the function can include only code (or function calls) that can be
safely executed within an ISR or system context. For example, the following
conditional function is invalid because semTake( ) must not be used in an ISR.
int conditionFunction (void)
{
if (vxTicks >= (sysClkRateGet() * 60 * 60))
{
/* semTake NOT ALLOWED in ISR context*/
semTake (mySem);
As trigger evaluation points are present throughout the VxWorks kernel, you can
not use printf( ) or logMsg( ) in condition functions. The above example could be
corrected by making the printf( ) into a trigger action function and checking Defer,
described in 13.5.2 Writing a Call Function as an Action, p.85. For information about
which routines can safely be called from ISRs, see the VxWorks Application
Programmer’s Guide.
You can also call a user-defined function that collects appropriate diagnostic
information at the time the trigger fires. One way to do this would be to use
wvEvent( ) in user-defined function. For more information, see The wvEvent( )
Routine, p.135.
A call function takes an integer argument and returns an integer value. Unlike a
condition function, an action function can be deferred because the function is not
executed to evaluate the trigger; instead it is added to a trigger work queue. For
more information, see Defer Action, p.73.
85
Wind River System Viewer
User's Guide, 3.2
This example demonstrates how to start and stop System Viewer with a VxWorks
family User Event and triggering. User Event IDs must be in the range of
40000-65535.
86
13 Triggering
13.5 Using Functions with Triggering
87
Wind River System Viewer
User's Guide, 3.2
88
13 Triggering
13.6 Importing Previous Version Trigger Files
13
89
Wind River System Viewer
User's Guide, 3.2
90
14
User Events (VxWorks Family)
14.1 Introduction 91
14.2 User Event Display 92
14.3 The User Events Description File 93
14.4 Validating XML Modifications 104
14.5 Advanced Techniques: Custom Parameter Formatting 106
14.1 Introduction
System Viewer can display user-defined events, generally referred to as User
Events. These are inserted into an event log as the thread of execution on a target
passes over the corresponding customer-inserted instrumentation points.
NOTE: User Events with large data payloads will result in copying large amounts
of data into the System Viewer log. This may impact performance of time-critical
code.
Depending on the version and variant of the VxWorks Target Operating System
(referred to as TOS in following) you use, details on how to add these
instrumentation points will vary as described in documentation for that VxWorks
version and variant. This chapter details how the presentation of these events is
controlled in the System Viewer Log Viewer on a VxWorks family TOS.
91
Wind River System Viewer
User's Guide, 3.2
NOTE: User Events as used by the VxWorks family of operating systems are not to
be confused with Custom Events. Although the purpose and output are essentially
the same, input and internal handling differ.
! CAUTION: Before changing any XML file shipped with System Viewer, you must
ensure that you create a backup copy of that file and put it in a safe place, outside
the Workbench installation tree. You can use these backup files to restore your
installation to its original, functioning state should the need arise.
There are two levels of customization which can be performed on the display of
User Events simply by editing the appropriate section of the supplied XML for
your chosen TOS:
1. change the displayed icon
2. change the displayed text
In addition, the way in which any encapsulated data is formatted for display may
be changed by writing custom formatters in Java and then making these formatters
available to System Viewer at runtime. This is, however, an advanced technique
which should be used only by experienced Java programmers, see 14.5 Advanced
Techniques: Custom Parameter Formatting, p.106. The default formatter provided in
System Viewer should be sufficient for most needs.
92
14 User Events (VxWorks Family)
14.3 The User Events Description File
The outline structure of a System Viewer XML file is fixed and that format must be
adhered to if the file is to be loaded correctly by the System Viewer runtime.
! CAUTION: All System Viewer XML files must conform to a strict structure, or they
will fail to parse correctly at runtime, and may render System Viewer inoperative.
Before editing any System Viewer XML file, be sure to put a backup copy of the
original file in a safe place (outside the Workbench installation tree) so that you can
restore it should the need arise.
93
Wind River System Viewer
User's Guide, 3.2
The formal structure of a System Viewer event dictionary XML file is defined in its
DTD (Document Type Description), which may be inspected at:
installDir/workbench-N.N/wrsv/N.N/host/resource/windview/DTDs/EventDictionary.dtd
By default, User Events occupy a single block of contiguous Event IDs. The content
of user.xml for any TOS will reflect this in that all the corresponding XML
descriptions of these events are grouped into a single EventRangeDescription
element.
For example, here is the default user.xml file for VxWorks 6.0 (and higher) which
demonstrates the above XML file structure and shows a single
EventRangeDescription element which describes the entire User Event range:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE EventDictionary SYSTEM "../../DTDs/EventDictionary.dtd">
<EventDictionary>
<EventClass
key="user"
displayName="User Events"
helpTopicId="VXWORKS6_user_CLASS_HELP">
<EventRangeDescription
eventIdStart="40000"
eventIdCount="25536"
nameRoot="EVENT_USER"
displayNameRoot="user"
nameRootSuffixStart="0"
icon="images/defaultUser.gif"
trigger="true"
helpTopicId="VXWORKS6_EVENT_USER_EVENT_HELP"
handler="com.windriver.windview.plugins.wv.vxworks.UserEventDescription">
<EventParam
type="UINT32"
name="pc"
formatStr="0x%08x"/>
<EventParam
type="BLOB"
name="data"
formatter="com.windriver.windview.agnostic.wv.SmartHexAsciiFormatter"/>
</EventRangeDescription>
</EventClass>
</EventDictionary>
94
14 User Events (VxWorks Family)
14.3 The User Events Description File
! CAUTION: The original element defining the User Event range defines the entire
permitted range for User Events (40000-65535 in the example above). Do not, when
editing User Events, stray outside this range.
NOTE: If you design your own icon, please abide by the following guidelines:
Your icon should be no more than 16 pixels high.
Use a maximum of 256 colours.
Use a transparent background.
Remember that System Viewer can display your icon on either a black or a
white background. Ensure that your icon will show up against both.
95
Wind River System Viewer
User's Guide, 3.2
96
14 User Events (VxWorks Family)
14.3 The User Events Description File
If you want to change the display characteristics of all User Events, all you have to
to do is to change the attributes of their collective EventRangeDescription.
As described in the previous section, the attributes that may be changed in the
EventRangeDescription are:
nameRoot
nameRootSuffixStart
icon
trigger
handler
And, within the EventParam child elements:
name
formatter
The first step in editing a User Event is to remove the required UserEvent ID (or 14
block of UserEvent IDs) from the EventRangeDescription. This is done by
splitting the range into two and leaving a "hole" to hold the extracted IDs.
For example, if we want to remove a block of 100 User Events from the range,
starting at EventID=40100, we would replace the original one
EventRangeDescription element with two EventRangeDescriptions, the first
covering the EventID Range 40000-40099 and the second covering the EventID
range 40200-65535. This leaves a hole in the defined Event IDs from 40100 to 40199
(i.e. 100 events).
97
Wind River System Viewer
User's Guide, 3.2
In the first block, the EventIdStart remains at 40000 as before, but only covers 100
events, as shown by the new eventIdCount. Display numbering in this range will
start from 0 as shown in the nameRootSuffixStart attribute. Thus, for an event
with event ID 40000, the displayed name will be user0.
In the second block, the EventIdStart now contains 40200 which is the starting
point of the block defined by this new range. The eventIdCount is 25336. The
98
14 User Events (VxWorks Family)
14.3 The User Events Description File
! CAUTION: If any EventDescription elements are used, they must appear after all
the EventRangeDescription elements in the XML file. Failure to observe this
restriction will result in the XML file failing to parse and load.
14
To fill in the gap using a single EventRangeDescription, you could, for example,
append the following XML:
<!-- eventId range 40100-40199 inclusive -->
<EventRangeDescription
eventIdStart="40100"
eventIdCount="100"
nameRoot="EVENT_USER"
displayNameRoot="myUserEvent"
nameRootSuffixStart="0"
icon="images/myUserIcon.gif"
trigger="true"
handler="com.windriver.windview.plugins.wv.vxworks.UserEventDescription">
<EventParam
type="UINT32"
name="pc"
formatStr="0x%08x"/>
<EventParam
type="BLOB"
name="data"
formatter="com.windriver.windview.agnostic.wv.SmartHexAsciiFormatter"/>
</EventRangeDescription>
This would fill the hole exactly, from Event IDs 40100-40199. The display of the first
event in this range would be myUserEvent0 since we have changed the
displayNameRoot and the nameRootSuffixStart. Also, the icon for the events
would change to that provided in images/myUserIcon.gif, but still suitably
99
Wind River System Viewer
User's Guide, 3.2
decorated with the user event number, because we are still using the default value
in the handler attribute. The helpTopicId attribute has been removed since there
will be no corresponding entry in the Workbench documentation for this new
range of event descriptions.
Gaps in the [re]defined event range may also be filled using discrete
EventDescription elements. Each of these covers just one event ID and offers the
greatest scope for customization of individual events.
As an example, we could fill in the very first event ID in the gap created above with
the following fragment of XML which defines the event for ID 40100:
<!-- This discrete EventDescription is provided for Event ID # 40100 which
has the data structure of a User Event.
The number, order and type of each of the parameters
must be EXACTLY as shown (i.e. EXACTLY as for all other user events),
since this format is dictated by the VxWorks runtime.
Here, the "icon" attribute in the EventDescription has been
modified to point to a user-defined icon for this event.
-->
<EventDescription id="40100"
name="MY_USER_EVENT_0"
trigger="true"
displayName="My User Event #0"
icon="images/myUserEvent0Icon.gif">
<EventParam
type="UINT32"
name="pc"
formatStr="0x%08x"/>
<EventParam
type="BLOB"
name="data"
formatter="com.windriver.windview.agnostic.wv.SmartHexAsciiFormatter"/>
</EventDescription>
Here, event ID 40100 has been defined so that it will display as My User Event #0
and have the custom-supplied icon images/myUserEvent0Icon.gif located relative
to the user.xml file. Nothing else has changed.
The remaining bits of the hole created in the user event ID range may be filled with
any combination of EventRangeDescription and EventDescription elements.
NOTE: It is not necessary to fill in the entire range; holes may be left. However, if
a hole is left, you must be sure that your TOS runtime will not emit any events
which correspond to the omitted event IDs, or your log will fail to parse
completely due to missing event descriptions.
100
14 User Events (VxWorks Family)
14.3 The User Events Description File
In System Viewer 4.9 and higher, it is possible to use a different form of the icon
attribute of the EventDescription element to have an icon, optionally coloured,
complete with text, inserted on the fly, without having to manually design images
and save them in your installation. This is a real time-saver.
As seen before, the default form of an EventDescription's icon attribute is
icon="images/myIcon.gif", where the value of the icon attribute is simply the path
to an image file relative to the containing XML file.
NOTE: Path separators in the icon attribute must be a forward slash, regardless of
which host operating system you are using; that is, including Windows.
The extended form of the icon attribute allows for quick creation of new
EventDescriptions, removing the need for manually creating image files.
If you want to use the extended form of the icon attribute, you should not use your
own handler attribute. Rather, you should not insert any handler attribute at all.
This is because the extended functionality is provided by the default Event 14
Description handler.
Syntax
The extended form of the icon attribute has a formal syntax as follows:
icon="specifier [,specifier]*"
specifier: text=TEXT | textPosition=TEXTPOSITION | color=#RRGGBB |
icon=ICON_PATH
where:
TEXT
is the text to be composited into the icon (must not contain an equals or
comma character). If the text specifier is omitted, no text will be
composited on to the icon. You can also you can also set the text of the
event to be the event id by using $id notation.
TEXTPOSITION
is the position of the text in relation to the icon. The possible values are:
[north|south|east|west|southeast|southwest|northeast|northwest]
101
Wind River System Viewer
User's Guide, 3.2
RRGGBB
is the hex Red, Green, and Blue values of the desired color of an
auto-generated icon and any composited text. The format is per HTML
color definitions, with each color component being between 00 and FF Hex.
If the color specifier is omitted, the default color will be used (#00C0C0, a
dark cyan).
ICON_PATH
is the path of a desired icon for compositing, relative to the containing
XML file. If the icon specifier is omitted, a default icon will be generated
on the fly.
The table below summarizes what happens depending on the combination of
specified icon attribute specifiers.
No No No No icon, no text
Examples
1. icon="text=myUserEvent"
Simply creates an icon with the default shape (a small downward facing
triangle), with the given text composited above, both in the default color (dark
cyan).
2. icon="color=#FF0000"
Creates an icon with the default shape in bright red, with no text.
3. icon="text=myUserEvent,color=#00FF00"
102
14 User Events (VxWorks Family)
14.3 The User Events Description File
Creates an icon with the default shape with text "myUserEvent" composited
above, both in bright green.
4. icon="icon=images/myIcon.gif"
Uses the supplied icon, with no text. This is equivalent to the non-extended
form of the icon attribute: icon="images/myIcon.gif"
5. icon="text=myUserEvent,icon=images/myIcon.gif"
Composites the given icon and the given text, with the text in the default color
(dark cyan). The icon will be rendered exactly as in the supplied image file.
6. icon="text=myUserEvent,color=#0000FF,icon=images/myIcon.gif"
Composites the given icon and the given text, with the text in the given color
(bright blue). The icon will be rendered exactly as in the supplied image file.
7. icon="text=$id,color=#FF0000,textPosition=southeast,icon=images/myIcon.gif"
Composites the given icon and the event text, with the text in the given color
(red) positioned southeast of the icon.
So, to redesign our new EventDescription for our User Event with event ID 40100
(as shown above), but using the extended form of the icon attribute, our new
14
EventDescription element could be as follows:
<EventDescription id="40100"
name="MY_TRACE_EVENT_0"
trigger="true"
displayName="Trace#0"
icon="text=Trace0">
<EventParam
type="UINT32"
name="pc"
formatStr="0x%08x"/>
<EventParam
type="BLOB"
name="data"
formatter="com.windriver.windview.agnostic.wv.SmartHexAsciiFormatter"/>
</EventDescription>
By doing this, instances of the event with event ID 40100 would be shown as
Trace#0 as the displayed event name, and have an icon which looks like a small,
downward pointing, dark cyan triangle with the text Trace0 above it, also in dark
cyan.
103
Wind River System Viewer
User's Guide, 3.2
An example of a complete new user.xml file, written specifically for VxWorks 6.N,
is provided as an appendix (see E. VxWorks6.N user.xml Example File). The example
demonstrates many of the techniques described in this section.
If your TOS is not VxWorks 6.N, you should use the default user.xml file (see
14.3.1 Location of the User Events Description File, p.93) for your TOS as a prototype,
and be sure not to alter the range of user event IDs permitted for that TOS.
104
14 User Events (VxWorks Family)
14.4 Validating XML Modifications
Examples
These examples illustrate how you would use the xmldictcc command line utility
on different hosts and with given Workbench, System Viewer, and TOS versions.
/user/fred/wb/workbench-2.6/wrsv/4.9/host/sun4-solaris2/bin/wrsv-xmldictcc -v
-c /user/fred/wb/workbench-2.6/wrsv/4.9/host/resource/windview/VxWorks/6.0
105
Wind River System Viewer
User's Guide, 3.2
User Events contain a BLOB parameter which can contain a binary payload in the
event generated by the TOS instrumentation. The Java formatter used in the
default user.xml is:
com.windriver.windview.agnostic.wv.SmartHexAsciiFormatter
which will display the content of the BLOB payload as ASCII if the content consists
entirely of ASCII characters, or as a mixed HEX/ASCII decode if there are any
non-ASCII characters in the payload. However, in your own TOS runtime code, it
is possible to construct a binary payload for your User Event which contains a
predefined data structure.
For example, your runtime code may define the following data structure
struct
{
unsigned int field1;
unsigned int field2;
unsigned int field3;
} myUserEventPayload;
and have this included as the BLOB payload for your User Event.
It is then possible to write a custom EventParameterFormatter implementation in
Java which understands and appropriately formats the data structure of this
payload, rather than using the standard Hex/ASCII formatter.
For full details on how to write a custom Event Parameter Formatter, please see the
online Wind River System Viewer API documentation provided for the
com.windriver.windview.agnostic.wv.eventlog.EventParameterFormatter
interface. The easiest way to find the relevant documentation is to open the
Wind River Workbench online help and search for:
“eventlog.EventParameterFormatter”
106
14 User Events (VxWorks Family)
14.5 Advanced Techniques: Custom Parameter Formatting
! CAUTION: As part of this process, you will need to compile your new Java class
and put it into a Jar file. This must be done with a Java SDK which produces code
that is compatible with Java 1.4. Extensions to the Java language introduced in Java
1.5 (or later) must not be used.
Your Java compilation command line must include the wv.jar Jar file in the
compilation classpath. The wv.jar file is located in
installDir/workbench-N.N/wrsv/N.N/host/java/lib/
14
107
Wind River System Viewer
User's Guide, 3.2
108
15
System Viewer for
Wind River Linux
109
Wind River System Viewer
User's Guide, 3.2
NOTE: If you are using Wind River Linux 2.0, add the ltt-control package to your
filesystem. If you are using Wind River Linux 3.0, add wrsv-ltt package to your
filesystem. You must rebuild your kernel afterwards.
The LTT kernel component can be found using the Workbench kernel configurator.
A filesystem rebuild is required afterwards.
For more information, see Wind River Workbench By Example (Linux 3 Version), 3.1:
Configuring Platform Kernels.
Apart from that, System Viewer configuration for Linux is, on the whole, the same
as for VxWorks. Configuration features are fully supported and generic tasks work
the same way as on VxWorks. See 3. Configuring a Logging Session and following
chapters for general information in this respect.
This configuration option determines whether the modules and markers that
provide instrumentation for the log collection are armed and disarmed before and
after log collection. Selecting this option ensures that modules and markers are
always armed before logging is started, and disarmed before logging is stopped.
110
15 System Viewer for Wind River Linux
15.2 Using System Viewer Configuration in Workbench
Enabling this option does have an impact on the time it takes to start logging. This
is because an additional process, which performs the arming of markers and
modules, is executed on the target prior to log collection. This additional process
appears in the summary panel, in the list of commands to be executed.
NOTE: Wind River recommends you select this option. While disabling it
improves log collection startup time, there is a risk that if logging is started before
modules and markers are armed, the collected log will be empty. If logging startup
time is important, see Arming and Disarming Modules and Markers on a Target Shell,
p.111, for information on setting up instrumentation directly on the target.
In addition to this option in Workbench, you can also do the following with the
wrsv-lttconfig program:
Arm and disarm modules and markers on the target shell.
Add new modules or markers.
Remove modules or markers.
List the modules and markers to be armed.
Modules and markers can be armed and disarmed directly on the target with the
wrsv-lttconfig command. To arm, use the command with the -a parameter; to
disarm, use the -d parameter.
111
Wind River System Viewer
User's Guide, 3.2
wrsv-lttconfig -d
2. Edit the wrsv-lttconfig.conf file to add the module in which the marker is
contained. For example:
[custom-trace]
3. If the module containing the marker has no other markers enabled, you can
safely comment out the module. For example:
#[custom-trace]
112
15 System Viewer for Wind River Linux
15.2 Using System Viewer Configuration in Workbench
To list all armed modules and markers, enter the following command:
wrsv-lttconfig -l
The output directory for storing LTTng target trace files, and the system used when
creating new trace files.
Specify a new name for each trace collected
After every log collection you have to enter a new directory name. The
directory name must not exist on the target. The trace files will remain on the
target until deleted manually.
Add incrementing suffix to target trace name
A unique, sequential number is suffixed to the directory name each time a log
is collected. The trace files will remain on the target until deleted manually.
Overwrite target trace files when collecting a new log
The output directory is re-used, and existing trace files in the directory are
overwritten every time a log is collected.
113
Wind River System Viewer
User's Guide, 3.2
The number and size of sub-buffers in the target memory used during tracing. If
this option is not selected, default values are used.
NOTE: Choosing 2 buffers of a small size is likely to lead to lost events. To check
for lost event run dmesg(1) on the target. To reduce the risk of losing events either
increase the number of buffers, increase the size of the buffer, or both.
These settings determine the host directory and filename under which to save the
collected event log. The LTTng daemon collects and saves trace files in the
directory you specified in the 15.2.4 Target File System Options, p.113. These files are
then copied from the target to the host.
The trace files are copied from the target and saved in a subdirectory, named in the
Output Filename field, of the directory specified in the Directory field. These files
are then converted to single file, in a format that is understood by the
System Viewer, and saved to the filename you specified in the Output Filename
field. If conversion fails, the LTTng files are left in the specified directory.
The following options are available in Output Filename:
Automatically download log when logging stops
After log collection stops, copy the LTTng files from the target to the host and
convert to a Wind River System Viewer raw file (.wvr).
Automatically view downloaded log
Once the successful download and conversion is complete, automatically open
the log in the Log Viewer.
Add an incrementing suffix to the filename in preference to
a time and date stamp
Append an incrementing index to the filename, instead of a time-and-date
stamp. If this option is not selected, the time and date of the transfer of the log
from the target are appended to the filename. Using this option prevents
existing logs from being overwritten.
114
15 System Viewer for Wind River Linux
15.2 Using System Viewer Configuration in Workbench
Save the LTTng trace files after conversion to System Viewer format (.wvr). The
default is to delete trace files after conversion.
The information in this section is specific to System Viewer for Wind River
Linux 2.x.
You can selectively include or exclude instrumentation types logged by
System Viewer. These instrumentation types, called probes, can either be built into
the kernel, or included as modules which are loadable at run time.
The target Module Manager, which appears as a tab in the
System Viewer Configuration utility, lets you configure which instrumentation
15
modules to include or exclude for log collection.
The Module Manager tab presents a list of the probe modules the target supports.
Select the probes you want to collect information about during logging, and click
the Update Modules button.
If you suspect that the Module Configuration list might be out of synch with the
modules currently loaded on the target, click the Refresh from target button to
reread the target data and update the list.
NOTE: If there are no probe modules on the target, the module list will be empty
and it will be assumed that all instrumentation is built into the kernel. If there are
modules available and none are loaded, a warning will be given. This warning will
appear even if only some modules are built into the kernel.
115
Wind River System Viewer
User's Guide, 3.2
In the event-icons.txt file, the event description has the following format:
event_name text=identifyingText,color=#hexRgbValue,icon=pathToImagesDir/imageFilename
event_name
The name of the event that is contained in the trace files.
text
Optional text to be used alongside an image.
color
An optional color specification, given as a hexadecimal RGB value.
icon
An optional pointer to an image to be used with the event. The path to the
image file is relative to the directory in which the event-icons.txt file is located.
For example, to add a new event named custom1 that uses the identifying text
“my_event1,” the color blue, and the default icon, add the following line to the
event-icons.txt file:
custom1 text=my_event,color=#0000ff
To add a new event named custom2 that has no text (and therefore does not require
a specified color) and uses the default icon, add the following line to the
event-icons.txt file:
custom2 icon=images/customImage.gif
116
15 System Viewer for Wind River Linux
15.3 Customizing the Appearance and Classification of Events
If the event-icons.txt file does not have an entry for a particular event, a default set
of parameters is used. By default, the event name is used for the text parameter,
color is set to white, and a default icon is used.
NOTE: Any customization of event appearance affects only those System Viewer
logs that are captured in LTTng format and converted to Wind River’s raw format
(.wvr). If you customize the appearance of events, these customizations will not
affect logs that have already been converted to .wvr format.
All events must be categorized under an event class. You can customize the event
class to which an event belongs.
To change an event’s event class, or to add new event classes, edit the
event-classes.txt file, located at:
installDir/workbench-3.1/wrsysviewer/host/resource/windview/wrlinux/3.0
In the event-classes.txt file, event classes are defined within square brackets ([ ]);
the events that belong to a class follow the event class definition.
15
Adding a New Event Class and Assigning Events to It
3. Add the events that should belong to this new event class. For this example,
we will use the custom events created in Adding an Event or Customizing Its
Appearance, p.116:
custom1
custom2
117
Wind River System Viewer
User's Guide, 3.2
NOTE: Any customization of event classes affects only those System Viewer logs
that are captured in LTTng format and converted to Wind River’s raw format
(.wvr). If you customize the classification of events, these customizations will not
affect logs that have already been converted to .wvr format
Once you have created a custom marker, there are two ways to enable it for use
with the System Viewer. With the first method, you enter commands on the target
shell to load the module, arm the markers, and then write the resulting events to
the trace. With the second method, you add the module and markers to the
System Viewer target configuration file; the System Viewer itself then performs the
arming of the instrumentation.
The markers are now available, but are not yet armed.
118
15 System Viewer for Wind River Linux
15.4 Custom Events for Wind River Linux 3.0
2. To arm the markers, enter the commands below. In this example, the markers
are named subsystem_event and subsystem_eventb.
echo "connect subsystem_event default" > /proc/ltt
echo "connect subsystem_eventb default" > /proc/ltt
3. Once tracing has started, you can enter the following command to write the
example events to the trace:
cat /proc/marker-example
When you have entered this command, you can then view the resulting events
in the System Viewer on the host. The cat command is simply a means to cause
the example marker points to be hit. When you use markers to debug a real
problem, the cat command is not necessary.
1. Before you can edit the System Viewer target configuration file, you must
know the names of the module and the markers included in the module. In the
example file marker-example.c, the module is named marker-example and the
markers are subsystem_event and subsystem_eventb.
2. The System Viewer target configuration file is located at
/etc/wrsv-lttconfig.conf. Edit this file by adding the module and marker
names to the list to be loaded. For this example, add the following lines to the 15
configuration file:
[marker-example]
subsystem_event default dynamic
subsystem_eventb default dynamic
Note that the module name is enclosed in square brackets ([ ]), while the
marker names are not. You can add your new lines anywhere in the
wrsv-lttconfig.conf file; placement is not significant. However, you may find
it convenient to put your added lines together, and to preserve the original
structure of the configuration file, so that you can easily find these lines later.
3. Save the wrsv-lttconfig.conf file.
If the instrumentation option described in 15.2.2 Instrumentation Configuration,
p.110, is selected, the new markers are automatically armed when you start
tracing from Workbench.
4. Once tracing has started, you can enter the following command to write the
example events to the trace:
cat /proc/marker-example
119
Wind River System Viewer
User's Guide, 3.2
When you have entered this command, you can then view the resulting events
in the System Viewer on the host. The cat command is simply a means to cause
the example marker points to be hit. When you use markers to debug a real
problem, the cat command is not necessary.
NOTE: Wind River Linux Custom Events are not to be confused with User Events as
used by the VxWorks family of operating systems. Although the purpose and
output are essentially the same, input and internal handling differ.
120
15 System Viewer for Wind River Linux
15.5 Custom Events for Wind River Linux 2.x
/* record a string */
MARK(kernel_generic_string, "%s", "example string");
/* record an integer */
MARK(kernel_generic_int, "%d", INT_MIN);
Once your kernel function has been instrumented, rebuilt, and loaded (using
modprobe) you can collect event data by configuring System Viewer in the normal
way. You should ensure that the ltt-probe-kernel-generic module is selected when
using the graphical user interface. If the probe is not activated then no event data
will be collected; loading the ltt-probe-kernel-generic module from either the user
interface or using modprobe activates custom events.
NOTE: The code or kernel module containing your MARK macros must be loaded
before the ltt-probe-kernel-generic module. If the ltt-probe-kernel-generic
module is either already loaded, or loaded before your module, then you need to
reload the probe using:
1.rmmod ltt-probe-kernel-generic
2.modprobe ltt-probe-kernel-generic
121
Wind River System Viewer
User's Guide, 3.2
122
A
VxWorks: Deployment
When you create a VxWorks Image Project in Wind River Workbench, all
components that System Viewer needs are included in the kernel by default. For
reference purposes, or in case the configuration has been modified, all kernel
components required by System Viewer are listed under D. Configuring VxWorks
for System Viewer.
123
Wind River System Viewer
User's Guide, 3.2
124
B
Programming Data Collection
B.1 Introduction
A critical aspect of data collection is managing and controlling the volume of
information you generate in a log as System Viewer allows you to collect a great
deal of information.
At the same time, instrumentation classes allow you to limit data collection either
by limiting the detail you collect, or by limiting detailed data collection to specific
objects. Multiprocessor support and the high-resolution timestamp drivers
contribute to the volume of detailed information that must be stored and
uploaded. The dynamic ring buffer provides a flexible method of balancing the
need to hold large amounts of data for upload to the host and the need to leave the
target applications enough resources to work normally.
125
Wind River System Viewer
User's Guide, 3.2
The routines in wvLib and wvNetDLib provide a much finer level of control over
how events are logged than the GUI tools or the basic wvOn( ) and wvOff( )
routines described in 7. Logging and Uploading Data.
Detailed information about the routines and examples of their usage are available
in the VxWorks OS Libraries API Reference; you can also examine the source code in
installDir/vxworks-N.N/target/config/comps/src/usrWindview.c. These routines
are more complex to use than wvOn( ) and wvOff( ), and the order in which they
are invoked is critical.
When you select a library in the GUI by checking the library name in the
Event Logging Level Configuration pane, all objects in that library are
instrumented. When you start data collection, events are logged for these objects.
You might be interested in how specific tasks, semaphores, message queues, and
so on interact so target routines are available to instrument individual objects. This
allows you greater precision in collecting only the data you are interested in seeing.
Table B-1 lists the Wind River System Viewer target routines that you can call to
control the instrumentation of particular objects.
Routine Description
126
B Programming Data Collection
B.2 Instrumenting Objects Programmatically
Routine Description
127
Wind River System Viewer
User's Guide, 3.2
The wvObjInst( ) routine sets up instrumentation for objects of the specified type
whether or not they already exist on the target system. To instrument only those
objects that are created after a certain point, use the wvObjInstModeSet( ) routine.
You can instrument specific objects in taskLib, semLib, msgQLib, and wdLib. You
cannot specify particular signals to instrument within sigLib, either all signals are
instrumented, or none are.
To instrument signals programmatically, call wvSigInst( ) instead of selecting the
library in the Additional Instrumentation Library Selection checklist. Either
method results in all signals being instrumented.
The wvSigInst( ) routine is declared as follows:
STATUS wvSigInst
(
int mode /* turn instrumentation on/off:
/* INSTRUMENT_ON, INSTRUMENT_OFF */
)
You can start event collection using the GUI, or you can start it programmatically.
The following example code shows how to create a log file on the host, enable
instrumentation of all possible classes, collect VxWorks events, signals, and
network instrumentation data, and start and stop logging.
/**********************************************************************
* wvLogFileUploadStart - create a logfile on the host, and start logging
*
* This routine uses various System Viewer functions to create a log on a
* host, to select the required instrumentation, and to start log
* collection. It is invoked with a logging level, and the name of the
* file to use on the host.
*
* e.g. wvLogFileUploadStart 7, "/tgtsvr/logfile.wvr"
*
* RETURNS: OK, or ERROR
*
* SEE ALSO: wvLogStop()
*
*/
128
B Programming Data Collection
B.2 Instrumenting Objects Programmatically
STATUS wvLogFileUploadStart
(
int instClass, /* 1, 3, or 7, for CLASS1, CLASS2,
CLASS3 instrumentation */
char * filename /* logfile name */
)
{
STATUS result;
int fd;
int n;
remove (filename);
if (fd == ERROR)
{
logMsg ("Error creating logfile\n",0,0,0,0,0,0);
return ERROR; A
}
}
close (fd);
wvEventInst (INSTRUMENT_ON);
wvSigInst (INSTRUMENT_ON);
wvNetEnable (8);
return result;
}
129
Wind River System Viewer
User's Guide, 3.2
/*
* Stop collection and close the file.
*/
For example, suppose you are adding a new module to an already existing piece
of code. You might be only interested in the new objects affect the existing
application and you do not want to instrument any other objects. Within the object
initialization code of the new module, you can surround the creation calls with
wvObjInstModeSet( ), as in the following example:
void newCode ()
{
...
130
B Programming Data Collection
B.2 Instrumenting Objects Programmatically
void existingCode ()
{
...
/* area of existing code where objs from newCode module used */
wvEvtLogStart;
...
131
Wind River System Viewer
User's Guide, 3.2
The data collected by these instrumented libraries is displayed in the usual way:
with icons in the main Event Graph.
Each instrumented library is enabled or disabled as a whole. To control which
libraries are logged, use the Event Logging Level Configuration pane as
described in 4. The Event Logging Level.
memLib
The information displayed from this library is slightly different from the
information generated and displayed for events in other libraries. While the event
data generated by memlib can be useful, the critical information is usually the
scalar information generated by the event. For example, the most interesting
information about memory activities is usually how much memory is allocated at
a particular time. For more information, see 10.3 Memory Usage, p.55.
On the host, you can view cumulative information depicting what happens as
allocated memory grows and shrinks in each target partition. You can see the
addresses of memory blocks that get allocated and freed. This simplifies detecting
memory leaks. For details about the information collected for events, the routines
associated with them, and so on, see the Wind River System Viewer User’s Reference:
Event Dictionary.
wvNetDLib
This library is available at the AIL level of logging, and includes events related to
activity in the dual IPv4/IPv6 stack. As with other instrumented objects, network
events may be instrumented individually or in groups. wvNetDLib events are
grouped according to class and priority.
132
B Programming Data Collection
B.2 Instrumenting Objects Programmatically
Networking vents are also divided into five priority levels, with 1 being the
highest. (VERBOSE, INFORMATION, WARNING, CRITICAL, and FATAL). The
network stack is instrumented for the following event classes:
WV_NETD_IP4_DATAPATH_CLASS
This class is for events that are directly related to IPv4 data transfer.
WV_NETD_IP6_DATAPATH_CLASS
This class is for events that are directly related to IPv6 data transfer.
WV_NETD_IP4_CTRLPATH_CLASS
This class is for events related to IPv4 network stack operations, such as
updating the routing table and handling socket operations.
WV_NETD_IP6_CTRLPATH_CLASS
This class is for events related to IPv6 network stack operations, such as
updating the routing table and handling socket operations.
To instrument network event logging programmatically, use the wvNetEnable( )
and wvNetDisable( ) routines, which start and stop network event logging,
respectively.
To enable Wind River System Viewer instrumentation for network events, you
must include network instrumentation in your VxWorks configuration
(INCLUDE_WVNETD). The start routine takes a single parameter specifying the
minimum priority level you wish to log. Events in both core and auxiliary classes
are logged and if no priority is specified, events for all priority levels are logged. A
In general, an instrumented target reports all events having priority greater than
or equal to the selected priority. In addition, the wvNetDLib library contains
routines that give much finer control over networking event logging. For example,
you can explicitly include or exclude individual events whose priorities are lower
than the selected level, explicitly enable or disable other events, and apply filters
to events based on addresses and port numbers.
For more information about logging network events and fine tuning these settings,
see the entry for wvNetDLib in the VxWorks OS Libraries API Reference.
133
Wind River System Viewer
User's Guide, 3.2
The e( ) Routine
The simplest type of user-generated event is the eventpoint, which can be set from
the shell with the e( ) routine. Eventpoints are analogous to breakpoints; they are
program locations that display the default User event icon when the instruction at
that location executes.
The e( ) routine has the following syntax:
STATUS e
(
INSTR * addr, /* address to set eventpoint; */
/* NULL = all eventpoints and */
/* breakpoints are raised */
event_t eventNo, /* event number */
int taskNameOrId, /* task in which to raise event- */
/* point; 0 = all tasks */
FUNCPTR evtRtn, /* function to be called when */
/* eventpoint encountered; NULL */
/* = no function, so eventpoint */
/* always raised */
int arg /* argument to evtRtn function */
)
NOTE: Eventpoints follow the same rules as breakpoints, including the following:
(1) Eventpoints in unbreakable tasks are not executed and thus do not appear in
the Event Graph. (2) Eventpoints cannot be set at interrupt level.
To see how a log looks when you set an eventpoint with e( ), follow these steps:
1. To set an eventpoint with an ID of 10 at the address of the sin( ) routine, click
the Launch Shell button and enter the following:
-> e sin, 10, 0, 0, 0
value - 1 = 0x1
134
B Programming Data Collection
B.3 Adding Eventpoints
135
Wind River System Viewer
User's Guide, 3.2
The wvEvent( ) routine can be called from unbreakable tasks or from interrupt
level, and is therefore more flexible than the e( ) routine.
Unbreakable tasks are those that are created with the VX_UNBREAKABLE bit set in
the options argument of the taskInit( ) or taskSpawn( ) routine. For example, you
can use user-generated events for error checking, as shown in the following
example:
if (something)
{
... /* run this code */
}
else
{
... /* we should never get here, but if we do, load any values */
/* of interest into event1Buff, then log using wvEvent */
If this event is ever encountered, the defaultUser event icon is displayed in the
Event Graph, with the event number just to the right of the icon. You can
double-click this icon to see the event properties.
To see how a log looks when an eventpoint is raised by wvEvent( ), perform the
following:
1. Click GO to start logging using any event logging level.
2. In the shell window, enter the following:
-> wvEvent (99, 0, 0)
value = 0= 0x0
B.4 Timestamping
When you develop your application for a target with a supported timestamp
driver, the instrumented kernel tags certain events with a high-resolution
timestamp. Those events are displayed in the System Viewer Event Graph along a
136
B Programming Data Collection
B.4 Timestamping
timeline that shows when each event occurred, based on the timestamps. You can
see the exact timestamp for any particular event in the status bar, for example,
when you click on the corresponding event icon.
The timestamp driver’s resolution is hardware dependent, but is typically between
100 KHz (10 microseconds per tick) and 1 MHz (1 microsecond per tick). For
information on the system timestamp driver for any supported board, see the
entry for the board in the online VxWorks BSP Reference.
In addition to the WRS-supplied system timestamp, you may choose to write your
own timestamp driver or use the timestamp provided by an emulator. For more
information, see VxWorks Device Driver Developer's Guide:Timestamp Drivers.
137
Wind River System Viewer
User's Guide, 3.2
138
B Programming Data Collection
B.5 Dynamic Buffer Allocation
The size of each individual buffer and the minimum and maximum number of
buffers are configured when the buffer ring is created. The library initially allocates
the minimum number plus one additional buffer for immediate addition to the
ring if necessary. If these buffers are filled, more buffers are added until the ring
reaches the maximum size. If data is read from the rBuff, the unused buffer
memory is freed so that it may be used by other processes.
Wind River System Viewer allows you to configure the rBuff which holds the
event log as it is captured and stored on the target. How the rBuff is configured
affects how logging interacts with the target application and thus the quality of the
resulting event log.
The optimum rBuff configuration is dependent on two factors:
the upload mode
any constraints on target memory
The configuration of the rBuff has a significant impact on the frequency with
which it is dynamically extended and, consequently, how much of this activity is
represented in the log. Optimum values depend on whether you are using
deferred or continuous upload mode.
In both deferred and continuous modes, the rBuff’s memory requirements are A
sourced from the system memory partition, the general partition from which all
malloc requests are sourced. Therefore it is important to consider the size of the
rBuff carefully to ensure that it does not conflict with target application
requirements.
Upload Modes
Deferred Upload
The most effective way to use Wind River System Viewer is in deferred upload
mode. In this mode the event data remains on the target during collection and can
be uploaded to the host once logging is completed. The entire log must be stored
on the target, which potentially requires a large ring buffer. If the system partition
is exhausted to the granularity of one buffer block or if the specified maximum
number of buffers is full, data collection stops. Triggering can be used to focus the
sequence captured, avoiding an unnecessarily large buffer requirement.
139
Wind River System Viewer
User's Guide, 3.2
In deferred upload mode, you may want all available memory to be used to hold
event data. The extendable ring of buffers can share available memory between the
customer application and the buffers. To collect as much event data as possible
within the constraints of the system and application, point the rBuff at the system
memory partition, set the maximum size to infinite by specifying 0xffffffff, and
recreate the problem. The rBuff starts at the specified minimum size, allowing the
application to allocate memory during initialization, and only begins extending
the buffer when its pre-allocated buffer is full.
The limitation of this approach is that the activity necessary to extend the rBuff
appears in the log. This makes it more difficult to determine exactly how the
system behaves when logging is not active. To avoid the intrusion of buffer
allocation on the log, you can pre-allocate the buffer space by setting the minimum
number of buffers equal to the maximum number of buffers. If you choose this
approach, configure the rBuff with a smaller number of large individual buffers.
Continuous Upload
In continuous upload mode, the data in the log is uploaded to the host periodically
as it is captured. Network activity required to upload the data itself generates
events that appear in the log. In addition, any activity required to resize the rBuff
is reflected in the log. This results in logs which are larger and more complex than
would be required to represent the application activity alone.
In continuous upload mode, you select a minimum and maximum number of
buffers. When an individual buffer is full, data is written to the next buffer. If there
are no more buffers and the current number of buffers is less than the maximum,
a new buffer is added. If a buffer is emptied and the current number is greater than
the minimum, the empty buffer is removed. This implementation is flexible and
dynamic. The collected data can fill all the memory available if necessary and if the
maximum number of buffers specified is that large, but the memory is not reserved
for logging if it is not needed.
The size of the individual buffers is used to determine when to start transferring
the event data to the host. A smaller individual buffer size initiates upload sooner
and more often. As there are variations in the rate at which events are generated
on the target and at which the network and host can achieve upload, the rBuff may
dynamically resize to accommodate the events stored on the target. Using a small
individual size maximizes the possibility of a suitable area of memory being
available to extend the rBuff.
140
B Programming Data Collection
B.5 Dynamic Buffer Allocation
Occasionally, the rBuff is still growing, although data is being uploaded to the
host. This happens when the number of events generated by the upload process is
greater than the number of events being uploaded. This is most likely to occur
when you have specified AIL level logging and instrumented semLib because the
upload implementation generates many semaphore events.
The ability to specify the minimum number of buffers to be retained avoids buffer
thrashing, where the ring is repeatedly extended and shortened as the amount of
data in the buffer crosses a particular threshold. There is nothing special about the
set of buffers that is originally allocated. As the ring of buffers is filled and then
emptied, the initial set is just as likely to be freed as those that are subsequently
allocated to meet demand. In a balanced system, the rBuff is not constantly
resized; the ring of buffers remain at the original size and allows steady upload of
event data.
For these reasons, when using continuous upload mode, configure the rBuff with
a larger number of small sized individual buffers and adjust the minimum number
of buffers if necessary to prevent thrashing.
Post-mortem Mode
The rBuff is managed by the task tWvRBuffMgr. The default priority of this task
is 100. This priority is usually appropriate, particularly when you use either
deferred upload mode or post-mortem mode. In some environments when you use
continuous upload mode, tWvRBuffMgr is not high enough priority to be able to
expand the number of buffers before they fill. If you find that the rBuff is
overflowing in continuous mode, use wvRBuffMgrPrioritySet( ) to give
tWvRBuffMgr a higher priority.
141
Wind River System Viewer
User's Guide, 3.2
If you are using a target configuration with sufficient memory resource to dedicate
a proportion to Wind River System Viewer, the ring of buffers may be configured
such so its individual buffers are pre-allocated. This is achieved by configuring the
minimum number of buffers in the ring equal to the maximum number of buffers.
If you are using a target with limited memory resource, use the ring buffer
dynamic resizing facility. This is done by allocating a low minimum number of
buffers with a greater maximum number of buffers. In deferred mode, only those
buffers required above the minimum, and for which space is available at the time
of request, are allocated. In continuous mode, the buffer only extends above the
minimum when necessary to hold the upload backlog, and those extra buffers are
freed when not in use. When using a dynamically resizing buffer configuration, the
ring buffer will not give up buffers it is holding to satisfy a request for memory
made by another part of the system. Therefore, care should be taken when
specifying the maximum ring buffer size.
When using post-mortem mode, the ring buffer is automatically configured to
make appropriate use of the available memory dedicated to this purpose.
The precise ring buffer configuration used is dependent upon many factors such
as relative host and target performance, network bandwidth, the rate at which the
target application generates events, and the upload method used. Therefore it is
advisable to experiment with the ring buffer and upload configuration if any of
these factors is altered to find a configuration which best suits your development
system.
142
C
Triggering API
C.1 Introduction
Wind River System Viewer provides a triggering API and triggering that works in
conjunction with logging. You can use the triggering interface to enter specific
information and commands, which are then downloaded to the target. Although
this data is usually entered in the triggering interface window, you can enter data
at command line. After this data is received, the target handles the following tasks:
Organizes the data received from the host in a trigger list.
Manages the trigger list and sets the flag to activate triggering when necessary.
Activates and deactivates event triggering.
Performs the actions requested by the host.
Interacts with Wind River System Viewer and the event points.
Saves the information coming from the host in a trigger structure.
When a flag is set, the event can be detected by the regular Wind River
System Viewer instrumentation, e( ), or trgEvent( ). Once the event occurs, the
ACTION_IS_SET variable is checked to see whether System Viewer
(instrumentation) logging or triggering is active. If triggering is active, the list of
triggers is checked to see if any is related to that event. If one is found, the specified
action is performed. Otherwise, execution continues, as shown in Figure C-1.
143
Wind River System Viewer
User's Guide, 3.2
Macros
144
C Triggering API
C.1 Introduction
Is either YES NO NO
logging or Logging On? Triggering On?
triggering
on?
NO YES YES
NO
EXIT Is there a trigger?
Run MACRO
YES
NO
Is it enabled?
YES
Is it the correct NO
type of event,
context, &/or
object?
YES
NO Is there a
condition? B
YES
NO
Perform
action NO
NO Is there a NO
Disable current chained trigger?
trigger?
YES
YES
Disable Enable new
trigger trigger
EXIT
145
Wind River System Viewer
User's Guide, 3.2
Triggering Structure
146
C Triggering API
C.2 Using the Triggering API Functions
Triggers are deleted when they are removed from the trigger list. The function B
trgDelete( ) also checks to see if any other triggers are still active; if none are, but
triggering is still active, it turns triggering off. Triggering introduces some
overhead and should be disabled if no function is present.
STATUS trgDelete
(
TRIGGER_ID trgId
)
{
/* delete trigger from table; if last trigger, turn triggering off */
}
When an event point is hit with triggering active, a check for existing triggers is
performed. Because of this overhead, it is important to activate triggering only
when necessary. These functions activate and deactivate triggering.
147
Wind River System Viewer
User's Guide, 3.2
STATUS trgOn()
{
/* set evtAction to TRG_ACTION_IS_SET if not already set */
}
void trgOff()
{
/* set evtAction to TRG_ACTION_IS_UNSET if it is on */
}
The following information is given: trigger ID, event ID, status, condition, disable
trigger, and chained trigger. If options is 1 and trgId is specified, all parameters are
shown for the specified trigger. If trgId is NULL all the triggers are shown.
STATUS trgShow
(
TRIGGER_ID trgId,
int options
)
{
/* display information on specified trigger or on all triggers */
}
trgEnable( ) sets the status of an existing trigger. This is the mechanism used to
activate a chained trigger. A counter is also incremented to keep track of the total
number of currently enabled triggers. This information is used by trgDisable( ).
STATUS trgEnable
(
TRIGGER_ID trgId
)
{
/* enable trigger unless max number of triggers is already enabled */
}
trgDisable( ) is used to disable a trigger. This function also checks to see if there are
any other triggers still active. This is done through the counter trgCnt. If trgCnt is
0 and triggering is still on, it calls trgOff( ).
STATUS trgDisable
(
TRIGGER_ID trgId
)
{
/* turn off trigger; if last active trigger, turn triggering off */
}
148
C Triggering API
C.2 Using the Triggering API Functions
trgEvent( ) triggers a user event. A trigger must exist and triggering must have
been started with trgOn( ) or from the triggering GUI to use this routine. The evtId
must be in the range from 40000 to 65535 on VxWorks-family Target Operating
Systems, or from 4096 to 4351 on Wind River Linux.
.
void trgEvent
(
event_t evtId /* event*/
)
{
/* set a user event with the specified ID */
}
149
Wind River System Viewer
User's Guide, 3.2
150
D
Configuring VxWorks for
System Viewer
D.1 Introduction
This chapter tells you where and how to configure a VxWorks Image Project to
appropriately support System Viewer functionality in Wind River Workbench.
For more information on VxWorks Image Projects and how to configure,
customize, scale, and build a VxWorks kernel image in Wind River Workbench, see
the Wind River Workbench User’s Guide.
For more information on how to configure and build a VxWorks kernel from the
command line, see the VxWorks Command Line Tools User's Guide. The specific
components you will need to build a kernel with System Viewer instrumentation
are listed in this chapter.
151
Wind River System Viewer
User's Guide, 3.2
NOTE: The easiest way to find components in the Kernel Editor is to click into the
window and type CTRL+f. In the Find dialog’s Pattern field, type an asterisk (*)
followed by the first few letters of the component.
152
D Configuring VxWorks for System Viewer
D.3 System Viewer Components
INCLUDE_WINDVIEW
Required to initialize and control logging.
INCLUDE_WINDVIEW_CLASS
Required for kernel instrumentation.
153
Wind River System Viewer
User's Guide, 3.2
INCLUDE_RBUFF
Supports the System Viewer ring buffer library (recommended as
sufficient if you are new to System Viewer).
INCLUDE_WV_BUFF_USER
Allows you to provide a custom implementation of the rBuff library.
INCLUDE_RBUFF_SHOW
Displays rBuff information and statistics about ring buffer performance.
Optional and only available if you include RBUFF.
INCLUDE_SEQ_TIMESTAMP
Supports sequential timestamping (recommended if you are new to
System Viewer)
INCLUDE_USER_TIMESTAMP
Supports user-defined timestamping.
INCLUDE_SYS_TIMESTAMP
Supports BSP-specific timestamping (not supported by the simulator).
NOTE: If you are stripping System Viewer components, do not remove this. It
is a VxWorks component.
INCLUDE_TRIGGERING
Adds support for triggering.
INCLUDE_WVNETD
Adds support for dual stack Network Instrumentation (wvNetDLib).
154
E
VxWorks6.N user.xml
Example File
E.1 Introduction
This appendix shows an example of a complete new user.xml file, written
specifically for VxWorks 6.N. The example demonstrates many of the techniques
described under 14.3 The User Events Description File, p.93. Explanations, where
required, are provided in embedded comments.
If your Target Operating System (TOS) is not VxWorks 6.N, you should use the
default user.xml file (see 14.3.1 Location of the User Events Description File, p.93) for
your TOS as a prototype, and be sure not to alter the range of user event IDs
permitted for that TOS.
155
Wind River System Viewer
User's Guide, 3.2
156
E VxWorks6.N user.xml Example File
E.2 VxWorks 6.N user.xml Example File
<EventParam
type="UINT32"
name="pc"
formatStr="0x%08x"/>
<EventParam
type="BLOB"
name="data"
formatter="com.windriver.windview.agnostic.wv.SmartHexAsciiFormatter"/>
</EventRangeDescription>
<!-- leaving a gap here for eventIDs 40200-40201 inclusive. These will
be completed using discrete UserEventDescriptions which must appear
after all the defined EventRangeDescriptions.
-->
157
Wind River System Viewer
User's Guide, 3.2
</EventClass>
</EventDictionary>
158
Index
A C
ACTION_IS_SET macro 144 chaining
aggregate core usage analysis 56 conditional triggers 78
AIL (additional instrumentation logging level) 126 triggers for logging 80
all events Overview mode 50 clock
analysis auxiliary, and timestamping 63
aggregate core usage 56 system, and timestamping 63
core usage per core 55 collecting data, see event logging
event graph/table 54 components,removing 124
memory usage 55 condition, using a function as, for triggering 83
ready state 58 configuration 42
running state 58 configure
system load 56 upload mode 19
analysis types 53 configuring
automatic upload 35 timestamping 63
auxiliary clock, and timestamping 63 VxWorks 151
connection
resume 42
continuous upload mode 20
B buffer thrashing 31
and ring buffers 140
boot loader 25
tWvRBuffMgr task priority, setting 141
buffering 27
upload failure 30
bufffer thrashing 31
core dump, VxWorks log upload 44
core usage per core analysis 55
cpu usage analysis 55
cpu, aggregate usage 56
custom events, Wind River Linux 120
159
Wind River System Viewer
User's Guide, 3.2
D event table 54
events
data defined 15
collectin 41 user, for starting and stopping System
logging 41 Viewer 86
uploading 41
defaultUser event
see also event, eventpoints F
e( ), using 134
wvEvent( ), using 135 file system location,logs 35
deferred upload mode 20 File via netDrv
dynamic ring buffers 139 components 153
defining File via NFS
triggers 70 components 153
deployment 124 File via NFS upload method 38
downloading triggers 74 File via TSFS
components 153
File via TSFS upload method 37
E filtering 59
functions
e( ) 134 call function used in triggering 85
errors in log files, and warnings 48 using as a triggering condition 83
event using with triggering 83
custom, see Wind River Linux
custom events
event function, generic 135 H
event graph
legend icons 54 host, remote 39
event intensity Overview mode 51
Event Receive utility
upload options 39
eventLog.wvr log file, default name 39 I
eventpoints 134
e( ), setting with 134 INCLUDE_NFS 153
wvEvent( ), setting with 135 INCLUDE_NFS_MOUNT_ALL 153
graph 54 INCLUDE_RBUFF 154
logging 125 INCLUDE_RBUFF_SHOW 154
application routines 134 INCLUDE_SEQ_TIMESTAMP 154
memory usage 132 INCLUDE_SYS_TIMESTAMP 154
programming 125 INCLUDE_TRIGGERING 154
sequential timestamping 137 INCLUDE_USER_TIMESTAMP 154
timestamping 136 INCLUDE_WINDVIEW 153
receive 39 INCLUDE_WINDVIEW_CLASS 153
user, see user events (VxWorks family) INCLUDE_WVUPLOAD_FILE 153
event analysis 54 INCLUDE_WVUPLOAD_SOCK 153
160
Index
161
Wind River System Viewer
User's Guide, 3.2
O
objects, instrumenting
S
programmatically 126
searching 60
Overview
semaphores, instrumenting 126
all events mode 50
semLib library, instrumenting specific objects 128
event intensity mode 51
SEQ_TIMESTAMP 154
peak activity mode 50
SEQ_TIMESTAMP component 65
sequential timestamp driver 137
socket connection 39
P socket via TCP/IP upload method 37
Socket via TSFS
peak activity Overview mode 50 components 153
post-mortem mode socket via TSFS upload method 37
ring buffers, dynamic, effect on 141 Socket via TSFS, components 153
typical configuration 26 starting
post-mortem upload 26 logging, with the System Viewer Configuration
post-mortem upload mode 23 utility 42
probe 115 System Viewer
programming with user events 86
event logging 125 state stipples 54
instrumenting objects 126 status
icons for triggers 75
stipples 54
stopping System Viewer, with user events 86
R SYS_TIMESTAMP 154
SYS_TIMESTAMP component 64
RBUFF 154 system clock, and timestamping 63
rBuff 27 system load analysis 56
162
Index
163
Wind River System Viewer
User's Guide, 3.2
V X
XML, validate 104
validating triggers, with variables 73
variables
defining to validate triggers 73
view graphs
sequenced events, displaying 137
timestamped events, displaying 136
VX_UNBREAKABLE 136
VxWorks
configuring 151
core dump log upload 44
user event see user events (VxWorks family)
164
Index
Index
165