System Analysis Toolkit Users Guide
System Analysis Toolkit Users Guide
QNX, QNX CAR, Neutrino, Momentics, Aviage, and Foundry27 are trademarks
of BlackBerry Limited that are registered and/or used in certain jurisdictions,
and used under license by QNX Software Systems Limited. All other trademarks
belong to their respective owners.
Table of Contents
About This Guide ......................................................................................................................7
Typographical conventions .................................................................................................8
Technical support ...........................................................................................................10
What the SAT is, what it can do for you, Introduction (p. 11)
and how it works
How the kernel buffers data Kernel Buffer Management (p. 37)
What the data tells you Interpreting Trace Data (p. 61)
Typographical conventions
Throughout this manual, we use certain typographical conventions to distinguish
technical terms. In general, the conventions we use conform to those found in IEEE
POSIX publications.
Reference Example
Commands make
Parameters parm1
You'll find the Other... menu item under Perspective ➝ Show View .
Cautions tell you about commands or procedures that may have unwanted
or undesirable side effects.
Technical support
Technical assistance is available for all supported products.
To obtain technical support for any QNX product, visit the Support area on our website
(www.qnx.com). You'll find a wide range of support options, including community
forums.
• ease of use
• insight into system activity
• high performance and efficiency with low overhead
The results of this activity are changes to the system state that are normally hidden
from developers. The SAT is capable of intercepting these changes and logging them.
Each event is logged with a timestamp and the ID of the CPU that handled it.
For a full understanding of how the kernel works, see the QNX Neutrino
Microkernel chapter in the System Architecture guide.
The SAT offers valuable information at all stages of a product's life cycle, from
prototyping to optimization to in-service monitoring and field diagnostics.
Process Process
4 5
Because it offers a system-level view of the internal workings of the kernel, the SAT
can be used for performance analysis and optimization of large interconnected systems
as well as single processes.
It allows realtime debugging to help pinpoint deadlock and race conditions by showing
what circumstances led up to the problem. Rather than just a “snapshot”, the SAT
offers a “movie” of what's happening in your system.
Because the instrumented version of the kernel runs with negligible performance
penalties, you can optionally leave it in the final embedded system. Should any
problems arise in the field, you can use the SAT for low-level diagnostics.
The SAT offers a nonintrusive method of instrumenting the code—programs can literally
monitor themselves. In addition to passive/non-intrusive event tracing, you can
proactively trace events by injecting your own “flag” events.
The QNX Neutrino System Analysis Toolkit (SAT) consists of the following main
components:
You can also trace and analyze events under control of the Integrated Development
Environment (p. 16).
Kernel
buffer
Instrumented
Threads kernel
Data capture
Data interpretation
Instrumented kernel
The instrumented kernel is actually the regular QNX Neutrino microkernel with a small,
highly efficient event-gathering module included. Except for the instrumentation, its
operation is virtually indistinguishable—the instrumented kernel runs at 98% of the
speed of our regular microkernel.
ls /proc/boot
and then look for a file whose name includes procnto. If the file name is
procnto-*instr, you're running the instrumented kernel; if the file name doesn't
include instr, you're running the noninstrumented kernel.
1. In your buildfile, replace the entry for procnto with the appropriate
procnto-*instr. For more information, see the entry for procnto in the Utilities
Reference.
2. Add tracelogger and traceprinter to your buildfile or target.
3. Run the mkifs utility to rebuild the image. For more information, see the entry
for mkifs in the Utilities Reference.
4. Replace your current boot image with the new one.
The kernel buffer is composed of many small buffers. Although the number of buffers
is limited only by the amount of system memory, it's important to understand that this
space must be managed carefully. If all of the events are being traced on an active
system, the number of events can be quite large.
To allow the instrumented kernel to write to one part of the kernel buffer and store
another part of it simultaneously, the kernel buffer is organized as a circular linked
list. As the buffer data reaches a high-water mark (about 70% full), the instrumented
kernel module sends a signal to the data-capture program with the address of the
buffer. The data-capture program can then retrieve the buffer and save it in a storage
location for offline processing or pass it to a data interpreter for realtime manipulation.
In either case, once the buffer has been emptied, it's once again available for use by
the kernel.
The QNX Neutrino RTOS includes a tracelogger that you can use to capture data.
This daemon receives events from the instrumented kernel and saves them in a file
or sends them to a device for later analysis.
Because the tracelogger may write data at rates well in excess of 20 MB/minute,
running it for prolonged periods or running it repeatedly can use up a large amount
of space. If disk space is low, erase old log files regularly. (In its default mode,
tracelogger overwrites its previous default file.)
You can also control tracing from your application (e.g. to turn tracing on just for a
problematic area) with the TraceEvent() kernel call. This function has over 30 different
commands that let you:
• set up filters
• control the tracing process
• insert user defined events
For more information, see the Capturing Trace Data (p. 41) chapter in this guide, the
entry for tracelogger in the Utilities Reference, and the entry for TraceEvent() in
the QNX Neutrino C Library Reference.
To aid in processing the binary trace event data, we provide the libtraceparser
library. The API functions let you set up a series of functions that are called when
complete buffer slots of event data have been received/read from the raw binary event
stream.
We also provide a linear trace event printer (traceprinter) that outputs all of the
trace events ordered linearly by their timestamp as they're emitted by the kernel. This
utility uses the libtraceparser library. You can also modify the traceprinter
source as a basis for your own custom parser or use the API to create an interface to
do the following offline or in real time:
• perform analysis
• display results
• debug applications
• create a self-monitoring system
• show events ordered by process or by thread
• show thread states and transitions
• show currently running threads
The traceparser library provides an API for parsing and interpreting the trace events
that are stored in the event file. The library simplifies the parsing and interpretation
process by letting you easily:
For more information, see the Interpreting Trace Data (p. 61) chapter in this guide,
as well as the entry for traceprinter in the Utilities Reference.
The QNX Momentics Tool Suite's IDE provides a graphical interface that you can use
to capture and examine tracing events. The IDE lets you filter events, zoom in on
ranges of them, examine the associated data, save subsets of events, and more.
For more information, see the Analyzing Your System with Kernel Tracing chapter of
the IDE User's Guide.
The QNX Neutrino microkernel generates events for more than just system calls. The
following are some of the activities that generate events:
• kernel calls
• scheduling activity
• interrupt handling
• thread/process creation, destruction, and state changes
• time events
• user events that may be used as “marker flags”
Also, single kernel calls or system activities may actually generate more than one
event.
Processes that are running on QNX Neutrino can run multiple threads. Having more
than one thread increases the level of complexity—the OS must handle threads of
differing priorities competing with each other.
Multithreaded example
Thread Priority
A High
B Low
Now we'll watch them run, assuming both start at the same time:
When logging starts, the instrumented kernel sends information about each
thread. Existing processes will appear to be created during this procedure.
Thread Time
A
Thread Thread
context-switch run time
time
In some cases, two or more threads may switch back and forth without actually
accomplishing much. This is akin to two overly polite people each offering to let the
other pass through a narrow door first— neither of them gets to where they're going
on time (two aggressive people encounter a similar problem). This type of problem is
exactly what the SAT can quickly and easily highlight. By showing the context-switch
operations in conjunction with thread state transitions, you can quickly see why
otherwise fast systems seem to “crawl.”
Restarting threads
Most events can be described in a single event buffer slot; we call these simple events.
When there's too much information to describe the event in a single buffer slot, the
event is described in multiple event buffer slots; we call this a combine event. The
event buffer slots all look the same, so there's no need for the data-capture program
to distinguish between them.
For more information about simple events and combine events, see the Interpreting
Trace Data (p. 61) chapter.
Wide mode
The instrumented kernel uses as many buffer slots as are necessary to fully
log the event. The amount of space is theoretically unlimited and can span
several kilobytes for a single event. Most of the time, it doesn't exceed four
16-byte spaces.
Fast mode
The instrumented kernel uses only one buffer slot per event.
In general, wide mode generates several times more data than fast mode.
Fast mode doesn't simply clip the tail end of the event data that you'd get in
wide mode; fast mode summarizes the most important aspects of the event in
a single buffer slot. Thus, the first element of an event in wide mode might
not be the same as the same event in fast mode.
You can set fast and wide mode for all classes, specific classes, and even specific
events in a class; some can be fast while others are wide. We'll describe how to set
this in the Capturing Trace Data (p. 41) chapter.
For the specific output differences between fast and wide mode, see the Current Trace
Events and Data appendix.
There can be a lot of events in even a small trace, so they're organized into classes to
make them easier for you to manage:
The sections that follow list the events for each class, along with a description of when
the events are emitted, as well as the labels that traceprinter and the IDE use to
identify the events.
For information about the data for each event, see the Current Trace Events and Data
appendix.
_NTO_TRACE_CONTROLBUFFER BUFFER Buffer The instrumented kernel starts filling a new buffer
_NTO_TRACE_CONTROLTIME TIME Time The 32 Least Significant Bits (LSB) part of the
64-bit clock rolls over, or the kernel emits an
_NTO_TRACE_CONTROLBUFFER event
INTR_ENTER
INTR_HANDLER_ENTER
INTR_HANDLER_EXIT
INTR_HANDLER_ENTER
INTR_HANDLER_EXIT
INT_EXIT
The traceprinter labels for these classes are KER_CALL, KER_EXIT, and
INT_CALL, followed by an uppercase version of the kernel call; the IDE labels consist
of the kernel call, followed by Enter, Exit, or INT.
Most of the events in these classes correspond in a fairly obvious way to the kernel
calls; some correspond to internal functions:
__KER_BAD N/A
__KER_CHANCON_ATTR ChannelConnectAttr()
__KER_CHANNEL_CREATE ChannelCreate()
__KER_CHANNEL_DESTROY ChannelDestroy()
__KER_CLOCK_ADJUST ClockAdjust()
__KER_CLOCK_ID ClockId()
__KER_CLOCK_PERIOD ClockPeriod()
__KER_CLOCK_TIME ClockTime()
__KER_CONNECT_ATTACH ConnectAttach()
__KER_CONNECT_CLIENT_INFO ConnectClientInfo()
__KER_CONNECT_DETACH ConnectDetach()
__KER_CONNECT_FLAGS ConnectFlags()
__KER_CONNECT_SERVER_INFO ConnectServerInfo()
__KER_INTERRUPT_ATTACH InterruptAttach()
__KER_INTERRUPT_DETACH InterruptDetach()
__KER_INTERRUPT_DETACH_FUNC N/A
__KER_INTERRUPT_MASK InterruptMask()
__KER_INTERRUPT_UNMASK InterruptUnmask()
__KER_INTERRUPT_WAIT InterruptWait()
__KER_MSG_CURRENT MsgCurrent()
__KER_MSG_DELIVER_EVENT MsgDeliverEvent()
__KER_MSG_ERROR MsgError()
__KER_MSG_INFO MsgInfo()
__KER_MSG_KEYDATA MsgKeyData()
__KER_MSG_READIOV MsgReadIov()
__KER_MSG_READWRITEV N/A
__KER_MSG_SEND_PULSE MsgSendPulse()
__KER_MSG_VERIFY_EVENT MsgVerifyEvent()
__KER_NET_CRED NetCred()
__KER_NET_INFOSCOID NetInfoScoid()
__KER_NET_SIGNAL_KILL NetSignalKill()
__KER_NET_UNBLOCK NetUnblock()
__KER_NET_VTID NetVtid()
__KER_NOP N/A
__KER_SCHED_GET SchedGet()
__KER_SCHED_INFO SchedInfo()
__KER_SCHED_SET SchedSet()
__KER_SCHED_YIELD SchedYield()
__KER_SIGNAL_ACTION SignalAction()
__KER_SIGNAL_FAULT N/A
__KER_SIGNAL_KILL SignalKill()
__KER_SIGNAL_PROCMASK SignalProcmask()
__KER_SIGNAL_RETURN SignalReturn()
__KER_SIGNAL_SUSPEND SignalSuspend()
__KER_SIGNAL_WAITINFO SignalWaitInfo()
__KER_SYNC_CONDVAR_SIGNAL SyncCondvarSignal()
__KER_SYNC_CONDVAR_WAIT SyncCondvarWait()
__KER_SYNC_CTL SyncCtl()
__KER_SYNC_DESTROY SyncDestroy()
__KER_SYNC_MUTEX_LOCK SyncMutexLock()
__KER_SYNC_MUTEX_REVIVE SyncMutexRevive()
__KER_SYNC_MUTEX_UNLOCK SyncMutexUnlock()
__KER_SYNC_SEM_POST SyncSemPost()
__KER_SYNC_SEM_WAIT SyncSemWait()
__KER_SYS_CPUPAGE_GET N/A
__KER_THREAD_CANCEL ThreadCancel()
__KER_THREAD_CREATE ThreadCreate()
__KER_THREAD_CTL ThreadCtl()
__KER_THREAD_DESTROY ThreadDestroy()
__KER_THREAD_DESTROYALL N/A
__KER_THREAD_DETACH ThreadDetach()
__KER_THREAD_JOIN ThreadJoin()
__KER_TIMER_ALARM TimerAlarm()
__KER_TIMER_CREATE TimerCreate()
__KER_TIMER_DESTROY TimerDestroy()
__KER_TIMER_INFO TimerInfo()
__KER_TIMER_SETTIME TimerSettime()
__KER_TIMER_TIMEOUT TimerTimeout()
__KER_TRACE_EVENT TraceEvent()
You can use the following convenience functions to insert certain System events into
the trace data:
trace_func_enter()
trace_func_exit()
trace_here()
If your system includes the adaptive partitioning scheduler module, the data for these
events includes the partition ID and scheduling flags (e.g.,
AP_SCHED_BILL_AS_CRIT). For more information, see the Adaptive Partitioning
User's Guide.
For more information about thread states, see “Thread life cycle” in the QNX Neutrino
Microkernel chapter of the System Architecture guide.
You can create these events by calling one of the following convenience functions:
trace_logb()
trace_logf()
trace_logi()
trace_nlogf()
trace_vnlogf()
The traceprinter label for these events is USREVENT; the IDE label is User
Event. In both cases, this label is followed by the event type, expressed as an integer.
The kernel often keeps pointers from different data structures to relevant threads.
When those threads are off-node via Qnet, there isn't a local thread object to represent
them, so the kernel creates a virtual thread object.
The events for virtual threads are similar to those for normal threads, but virtual threads
don't go through the same set of state transitions that normal threads do:
Instrumented
kernel
1 2 3 ... 1024
Kernel
buffers
As each buffer fills, the instrumented kernel sends a signal to the data-capturing
program that the buffer is ready to be read.
Each buffer is of a fixed size and is divided into a fixed number of slots:
Some events are single buffer slot events (“simple events”) while others are multiple
buffer slot events (“combine events”). In either case there is only one event, but the
number of event buffer slots required to describe it may vary.
For details, see the Interpreting Trace Data (p. 61) chapter.
The buffers share kernel memory with the application(s), and the kernel automatically
allocates memory at the request of the data-capture utility. The kernel allocates the
buffers in contiguous physical memory space. If the data-capture program requests a
larger block than is available contiguously, the instrumented kernel returns an error
message.
For all intents and purposes, the number of events the instrumented kernel generates
is infinite. Except for severe filtering or logging for only a few seconds, the instrumented
kernel will probably exhaust the circular linked list of buffers, no matter how large it
is. To allow the instrumented kernel to continue logging indefinitely, the data-capture
program must continuously pipe (empty) the buffers.
As each buffer becomes full, the instrumented kernel sends a signal to the
data-capturing program to save the buffer. Because the buffer size is fixed, the kernel
sends only the buffer address; the length is constant.
The instrumented kernel can't flush a buffer or change buffers within an interrupt. If
the interrupt wasn't handled before the buffer became 100% full, some of the events
may be lost. To ensure this never happens, the instrumented kernel requests a buffer
flush at the high-water mark.
The high-water mark is set at an efficient, yet conservative, level of about 70%. Most
interrupt routines require fewer than 300 event buffer slots (approximately 30% of
1024 event buffer slots), so there's virtually no chance that any events will be lost.
(The few routines that use extremely long interrupts should include a manual
buffer-flush request in their code.)
Therefore, in a normal system, the kernel logs about 715 events of the fixed maximum
of 1024 events before notifying the capture program.
Buffer overruns
The instrumented kernel is both the very core of the system and the controller of the
event buffers.
When the instrumented kernel is busy, it logs more events. The buffers fill more
quickly, and the instrumented kernel requests that the buffers be flushed more often.
The data-capture program handles each flush request; the instrumented kernel switches
to the next buffer and continues logging events. In an extremely busy system, the
data-capture program may not be able to flush the buffers as quickly as the
instrumented kernel fills them.
In a three-buffer scenario, the instrumented kernel fills buffer 1 and signals the
data-capture program that the buffer is full. The data-capture program takes
“ownership” of buffer 1 and the instrumented kernel marks the buffer as “busy/in
use.” If, say, the file is being saved to a hard drive that happens to be busy, then the
instrumented kernel may fill buffer 2 and buffer 3 before the data-capture program
can release buffer 1. In this case, the instrumented kernel skips buffer 1 and writes
to buffer 2. The previous contents of buffer 2 are overwritten and the timestamps on
the event buffer slots will show a discontinuity.
For more on buffer overruns, see the Tutorials (p. 69) chapter.
The program that captures data is the “messenger” between the instrumented kernel
and the filesystem.
Data stream
from kernel
buffer
tracelogger Custom
data-capture
program
User-defined
output
.kev file
(or stream)
The main function of the data-capture program is to send the buffers given to it by
the instrumented kernel to an output device (which may be a file or something else).
In order to accomplish this function, the program must also:
You must configure the instrumented kernel before logging. The instrumented kernel
configuration settings include:
The instrumented kernel retains the settings, and multiple programs access a
single instrumented kernel configuration. Changing the settings in one process
supersedes the settings made in another.
We've provided tracelogger as the default data-capture utility. Although you can
write your own utility, there's little need to; if you do, the quickest approach is to tailor
the tracelogger code to suit your own needs.
You can control the capture of data via qconn (under the control of the IDE),
tracelogger (from the command line), or directly from your application. All three
approaches use the TraceEvent() function to control the instrumented kernel:
Instrumented
kernel
TraceEvent()
For information about controlling the trace from the IDE, see the Analyzing Your System
with Kernel Tracing chapter of the IDE User's Guide.
Let's look first at using tracelogger, and then we'll describe how you can use
TraceEvent() to control tracing from your application.
The traceprinter utility doesn't have any issues with such traces
because it doesn't attempt to reorder the data and interpret it; it simply
dumps the contents of each event.
The options that you use when you start tracelogger affect the way that the
instrumented kernel logs events and how tracelogger captures them.
You can also specify the number of buffers that tracelogger itself uses.
For more information, see the entry for tracelogger in the Utilities Reference.
You can run tracelogger in several modes — depending on how and what you want
to trace — by specifying the following command-line options:
-n iterations
In this mode, the kernel logs events, and tracelogger captures iterations
buffers worth of data, and then terminates. This is the default mode, and
default number of iterations is 32.
-r
Ring mode: the kernel stores all events in its circularly linked list of buffers
without flushing them. The maximum time for which you can capture events
(without overwriting earlier ones) is determined by the number of allocated
buffers, as well as by the number of generated trace events.
If you don't specify the -r option, tracelogger runs in linear mode; every
filled-up buffer is captured and flushed immediately.
-d1
Daemon mode: the kernel doesn't log events, and tracelogger doesn't
capture them until an application calls TraceEvent() with a command of
-s seconds
The kernel logs events; tracelogger captures them over the specified
time.
-c
All of the above, except for daemon mode, constitute normal mode. In normal mode,
you configure, start, and stop the tracing from the command line; in daemon (-d1)
mode, your application must do everything from code. However, if you also use the -E
option, you get the best of both modes: the command-line configuration of normal
mode, and the full control of daemon mode.
Configuration method Command line only User program, using calls to Command line and user program
TraceEvent()
Logging starts Instantaneously Through a user program; also Through a user program; also
calls to TraceEvent() calls to TraceEvent()
For a full description of the tracelogger utility and its options, see its entry in the
Utilities Reference.
By default, the instrumented kernel and tracelogger collect data in fast mode; to
switch to wide mode, specify the -w option when you start tracelogger.
Filtering events
The tracelogger utility gives you some basic control over filtering by way of its -F
option. This filtering is limited to excluding entire classes of events at a time; if you
need a finer granularity, you'll need to use TraceEvent(), as described in the Filtering
(p. 51) chapter in this guide.
By default, tracelogger captures all events from all classes, but you can disable
the tracing of events from the classes as follows:
Interrupt -F2
Process -F3
Thread -F4
Communication -F6
System -F7
You can specify more than one filter by using multiple -F options. Note that you can't
disable the Control or User classes with this option. For more information about classes,
see the Events and the Kernel (p. 19) chapter of this guide.
Because the circular linked list of buffers can't hope to store a complete log of event
activity for any significant amount of time, the tracebuffer must be handed off to a
data-capture program. Normally the data-capture program pipes the information to
either an output device or a file.
By default, the tracelogger utility saves the output in the binary file
/dev/shmem/tracebuffer.kev, but you can use the -f option to specify a different
path. The .kev extension is short for “kernel events”; you can use a different extension,
but the IDE recognizes .kev and automatically uses the System Profiler to open such
files.
You can also map the file in shared memory (-M), but you must then also specify the
maximum size for the file (-S).
You don't have to use tracelogger to control all aspects of tracing; you can call
TraceEvent() directly—which (after all) is what tracelogger does. Using TraceEvent()
to control tracing means a bit more work for you, but you have much more control over
specific details.
You could decide not to use tracelogger at all, and use TraceEvent() exclusively,
but you'd then have to manage the buffers, collect the trace data, and save it in the
appropriate form—a significant amount of work, although you can take advantage of
the source code for tracelogger to help.
In practical terms you'll likely use tracelogger and TraceEvent() together. For
example, you might run tracelogger in daemon mode, to take advantage of its
management of the trace data, but call TraceEvent() to control exactly which events
to trace.
The TraceEvent() kernel call takes a variable number of arguments. The first is always
a command and determines what (if any) additional arguments are required.
For reference information about TraceEvent(), see the QNX Neutrino C Library
Reference. The source code for tracelogger might also help you.
As mentioned above, you can use TraceEvent() to manage the instrumented kernel's
buffers, but it's probably easier to run tracelogger in daemon mode and let it look
after the buffers. Nevertheless, here's a summary of how to do it with TraceEvent():
In order to allocate or free the trace buffers, your application must have the
PROCMGR_AID_TRACE ability enabled. For more information, see the entry
procmgr_ability() in the QNX Neutrino C Library Reference.
TraceEvent(_NTO_TRACE_DEALLOCBUFFER);
• To flush the buffer, regardless of the number of trace events it contains, use the
_NTO_TRACE_FLUSHBUFFER command:
TraceEvent(_NTO_TRACE_FLUSHBUFFER);
• To get the number of simple trace events that are currently stored in the trace
buffer, use the _NTO_TRACE_QUERYEVENTS command:
num_events = TraceEvent(_NTO_TRACE_QUERYEVENTS);
Modes of operation
TraceEvent(_NTO_TRACE_START);
TraceEvent(_NTO_TRACE_STARTNOSTATE);
TraceEvent(_NTO_TRACE_STOP);
You can decide whether to trace until you've gathered a certain quantity of data,
trace for a certain length of time, or trace only during an operation that's of
particular interest to you. After stopping the trace, you should flush the buffer by
calling:
TraceEvent(_NTO_TRACE_FLUSHBUFFER);
TraceEvent(_NTO_TRACE_SETRINGMODE);
As described earlier in this chapter, in ring mode the kernel stores all events in a
circular fashion inside the linked list without flushing them.
TraceEvent(_NTO_TRACE_SETLINEARMODE);
When you use this mode, every filled-up buffer is captured and flushed immediately.
Filtering events
You can select events in an additive or subtractive manner; you can start with no
events, and then add specific classes or events, or you can start with all events, and
then exclude specific ones. We'll discuss using TraceEvent() to filter events in the
Filtering (p. 51) chapter.
TraceEvent() gives you much finer control over wide and fast mode than you can get
with tracelogger, which can simply set the mode for all events in all traced classes.
Using TraceEvent(), you can set fast and wide mode for all classes, a specific class,
or a specific event in a class:
TraceEvent( _NTO_TRACE_SETALLCLASSESWIDE );
TraceEvent( _NTO_TRACE_SETALLCLASSESFAST );
• To set the mode for all events in a class, use the _NTO_TRACE_SETCLASSFAST
or _NTO_TRACE_SETCLASSWIDE command. These commands require a class as
an additional argument:
For example:
TraceEvent(_NTO_TRACE_SETCLASSWIDE, _NTO_TRACE_KERCALLENTER);
For example:
TraceEvent(_NTO_TRACE_SETEVENTFAST, _NTO_TRACE_KERCALLENTER,
__KER_INTERRUPT_ATTACH);
You can even use TraceEvent() to insert your own events into the trace data. You can
call TraceEvent() directly (see below), but it's much easier to use the following
convenience functions:
trace_func_enter()
trace_func_exit()
trace_here()
trace_logb()
trace_logbc()
Insert a trace event of an arbitrary class and type with arbitrary data
trace_logf()
trace_logi()
trace_nlogf()
trace_vnlogf()
If you want to call TraceEvent() directly, use one of the following commands:
• _NTO_TRACE_INSERTCUSEREVENT
• _NTO_TRACE_INSERTEVENT
• _NTO_TRACE_INSERTSUSEREVENT
• _NTO_TRACE_INSERTUSRSTREVENT
For more information, see the entry for TraceEvent() in the QNX Neutrino C Library
Reference.
Gathering many events generates a lot of data, which requires memory and processor
time. It also makes the task of interpreting the data more difficult.
Because the amount of data that the instrumented kernel generates can be
overwhelming, the SAT supports several types of filters that you can use to reduce the
amount of data to be processed:
A simple filter that chooses events based on their type, class, or other simple
criteria.
A more complex filter that lets you register a callback function that can
decide — based on the state of your application or system, or on whatever
criteria you choose — whether or not to log a given event.
Post-processing filter
A filter that you run after capturing event data. Like the dynamic rules filter,
this can be as complex and sophisticated as you wish.
The static and dynamic rules filters affect the amount of data being logged into the
kernel buffers; filtered data is discarded — you save processing time and memory,
but there's a chance that some of the filtered data could have been useful.
In contrast, the post-processing facility doesn't discard data; it simply doesn't use it
— if you've saved the data, you can use it later.
Data capture
Post-processing filter
Data interpretation
Most of the events don't indicate what caused the event to occur. For example, an
event for entering MsgSendv() doesn't indicate which thread in which process called
it; you have to infer it during interpretation from a previous thread-running event. You
have carefully choose what you filter to avoid losing this context.
You can use the static rules filter to track or filter events for all classes, certain events
in a class, or even events related to specific process and thread IDs. You can select
events in an additive or subtractive manner; you can start with no events, and then
add specific classes or events, or you can start with all events, and then exclude
specific ones.
The static rules filter is the best, most efficient method of data reduction. It generally
frees up the processor while significantly reducing the data rate. This filter is also
useful for gathering large amounts of data periodically, or after many hours of logging
without generating gigabytes of data in the interim.
_NTO_TRACE_ADDALLCLASSES, _NTO_TRACE_DELALLCLASSES
TraceEvent(_NTO_TRACE_ADDALLCLASSES);
TraceEvent(_NTO_TRACE_DELALLCLASSES);
_NTO_TRACE_ADDCLASS, _NTO_TRACE_DELCLASS
TraceEvent(_NTO_TRACE_ADDCLASS, class):
TraceEvent(_NTO_TRACE_DELCLASS, class):
For information about the different classes, see “Classes and events (p. 24)”
in the Events and the Kernel chapter of this guide.
_NTO_TRACE_ADDEVENT, _NTO_TRACE_DELEVENT
_NTO_TRACE_SETCLASSPID, _NTO_TRACE_CLRCLASSPID
_NTO_TRACE_SETCLASSTID, _NTO_TRACE_CLRCLASSTID
Emit or suppress all events from the specified process and thread IDs:
_NTO_TRACE_SETEVENTPID, _NTO_TRACE_CLREVENTPID
_NTO_TRACE_SETEVENTTID, _NTO_TRACE_CLREVENTTID
Emit or suppress a specific event for the specified process and thread IDs:
• _NTO_TRACE_COMM
• _NTO_TRACE_KERCALL, _NTO_TRACE_KERCALLENTER,
_NTO_TRACE_KERCALLEXIT
• _NTO_TRACE_SYSTEM
• _NTO_TRACE_THREAD
• _NTO_TRACE_VTHREAD
The instrumented kernel retains these settings, so you should be careful not to make
any assumptions about the settings that are in effect when you set up your filters. For
example, you might want to start by turning off all filtering:
TraceEvent(_NTO_TRACE_DELALLCLASSES);
TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_KERCALL);
TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_KERCALL);
TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_THREAD);
TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_THREAD);
TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_VTHREAD);
TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_VTHREAD);
TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_SYSTEM);
TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_SYSTEM);
TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_COMM);
TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_COMM);
You can select events in an additive or subtractive manner; you can start with no
events, and then add specific classes or events, or you can start with all events, and
then exclude specific ones.
For an example using the static filter, see the five_events.c (p. 76) example in
the Tutorials (p. 69) chapter.
The dynamic rules filter can do all the filtering that the static filter does—and
more—but it isn't as quick. This filter lets you register functions (event handlers) that
decide whether or not to log a given event.
If you want to use a dynamic rules filter, be sure that you've also set up a static
rules filter that logs the events you want to examine. For example, if you want
to dynamically examine events in the _NTO_TRACE_THREAD class, also call:
TraceEvent(_NTO_TRACE_ADDCLASS, _NTO_TRACE_THREAD):
For an example of using the dynamic rules filter, see the eh_simple.c (p. 83)
example in the Tutorials (p. 69) chapter.
if (ThreadCtl(_NTO_TCTL_IO, 0)!=EOK) {
fprintf(stderr, "argv[0]: Failed to obtain I/O privileges\n");
return (-1);
}
_NTO_TRACE_ADDCLASSEVHANDLER
Register a function to call whenever an event for the given class is emitted:
TraceEvent(_NTO_TRACE_ADDCLASSEVHANDLER, class,
int (*event_hdlr)(event_data_t*),
event_data_t* data_struct);
_NTO_TRACE_ADDEVENTHANDLER
Register a function to call whenever an event for the given class and event
type is emitted:
event_hdlr
A pointer to the function that you want to register. The prototype for the
function is:
data_struct
Event handler
The dynamic filter is an event handler that works like an interrupt handler. When this
filter is used, a section of your custom code is executed. The code can test for a set
of conditions before determining whether the event should be stored.
The only library functions that you can call in your event handler are those
that are safe to call from an interrupt handler. For a list of these functions,
see the Full Safety Information appendix in the QNX Neutrino C Library
Reference. if you call an unsafe function — such as printf() — in your event
handler, you'll crash your entire system.
If you want to log the current event, return a non-zero value; to discard the event,
return 0. Here's a very simple event handler that says to log all of the given events:
If you use both types of dynamic filters (event handler and class event handler),
and they both apply to a particular event, the event is logged if both event
handlers return a non-zero value.
In addition to deciding whether or not the event should be logged, you can use the
dynamic rules filter to output events to external hardware or to perform other tasks—
it's up to you because it's your code. Naturally, you should write the code as efficiently
as possible in order to minimize the overhead.
You can access the information about the intercepted event within the event handler
by examining the event_data_t structure passed as an argument to the event
event_data_t e_d_1;
uint32_t data_array_1[20]; /* 20 elements for potential args. */
e_d_1.data_array = data_array_1;
If you don't provide the data array, or it isn't big enough, your data
segment could become corrupted.
You can use the following macros, defined in <sys/trace.h>, to work with the
header of an event:
_NTO_TRACE_GETEVENT_C(c)
_NTO_TRACE_GETEVENT(c)
_NTO_TRACE_GETCPU(h)
Get the number of the CPU that the event occurred on.
_NTO_TRACE_SETEVENT_C(c,cl)
_NTO_TRACE_SETEVENT(c, e)
The bits of the feature_mask member are related to any additional features (arguments)
that you can access inside the event handler. All standard data arguments — the ones
that correspond to the data arguments of the trace event — are delivered without
changes within the data_array.
If any particular bit of the feature_mask is set to 1, then you can access the feature
corresponding to this bit within the feature array. Otherwise, you must not access the
feature. For example, if the expression:
is TRUE, then you can access the additional feature corresponding to identifier
_NTO_TRACE_FMPID as:
my_pid = feature[_NTO_TRACE_FIPID];
_NTO_TRACE_DELCLASSEVHANDLER
Remove the function for the given class and event type:
TraceEvent(_NTO_TRACE_DELCLASSEVHANDLER, class);
_NTO_TRACE_DELEVENTHANDLER
Remove the function for the given class and event type:
The post-processing facility is different from the other filters in that it reacts to the
events without permanently discarding them (or having to choose not to). Because the
processing is done on the captured data, often saved as a file, you could make multiple
passes on the same data without changing it—one pass could count the number of
thread state changes, another pass could display all the kernel events.
We'll look at traceprinter in more detail in the Interpreting Trace Data (p. 61)
chapter.
traceparser*() API
traceprinter Custom
Integrated data-interpretation
Development program
Environment
User-defined
output
The best tool (by far) for interpreting the copious amounts of trace data is the Integrated
Development Environment. It provides a sophisticated and versatile user interface that
lets you filter and examine the data.
For more information, see the Analyzing Your System with Kernel Tracing chapter of
the IDE User's Guide.
We also provide a traceprinter utility that simply prints a plain-text version of the
trace data, sending its output to stdout or to a file.
You can also build your own, custom interpreter, using the traceparser library.
The simplest way to turn the tracing data into a form that you can analyze is to pass
the .kev file through traceprinter. For details, see its entry in the Utilities
Reference.
Let's take a look at an example of the output from traceprinter. This is the output
from “Gathering all events from all classes (p. 71)” in the Tutorials chapter.
The output starts with some information about how you ran the trace:
TRACEPRINTER version 1.02
TRACEPARSER LIBRARY version 1.02
-- HEADER FILE INFORMATION --
TRACE_FILE_NAME:: all_classes.kev
TRACE_DATE:: Wed Jun 24 10:52:58 2009
TRACE_VER_MAJOR:: 1
TRACE_VER_MINOR:: 01
TRACE_LITTLE_ENDIAN:: TRUE
TRACE_ENCODING:: 16 byte events
TRACE_BOOT_DATE:: Tue Jun 23 11:47:46 2009
TRACE_CYCLES_PER_SEC:: 736629000
TRACE_CPU_NUM:: 1
TRACE_SYSNAME:: QNX
TRACE_NODENAME:: localhost
TRACE_SYS_RELEASE:: 6.4.1
TRACE_SYS_VERSION:: 2009/05/20-17:35:56EDT
TRACE_MACHINE:: x86pc
TRACE_SYSPAGE_LEN:: 2264
TRACE_TRACELOGGER_ARGS:: tracelogger -d1 -n 3 -f all_classes.kev
The next section includes information about all the processes in existence when the
trace started:
-- KERNEL EVENTS --
t:0x4f81e320 CPU:00 CONTROL: BUFFER sequence = 33, num_events = 714
t:0x4f81e320 CPU:00 CONTROL :TIME msb:0x000037b0 lsb(offset):0x4f81e014
t:0x4f82017a CPU:00 PROCESS :PROCCREATE_NAME
ppid:0
pid:1
name:proc/boot/procnto-smp-instr
t:0x4f820f9a CPU:00 THREAD :THCREATE pid:1 tid:1
t:0x4f821358 CPU:00 THREAD :THREADY pid:1 tid:1
t:0x4f821698 CPU:00 THREAD :THCREATE pid:1 tid:2
t:0x4f821787 CPU:00 THREAD :THRECEIVE pid:1 tid:2
t:0x4f8219ca CPU:00 THREAD :THCREATE pid:1 tid:3
t:0x4f821ac6 CPU:00 THREAD :THRECEIVE pid:1 tid:3
t:0x4f821c94 CPU:00 THREAD :THCREATE pid:1 tid:4
t:0x4f821d90 CPU:00 THREAD :THRECEIVE pid:1 tid:4
t:0x4f821f6c CPU:00 THREAD :THCREATE pid:1 tid:5
t:0x4f82205b CPU:00 THREAD :THRECEIVE pid:1 tid:5
t:0x4f8222aa CPU:00 THREAD :THCREATE pid:1 tid:7
t:0x4f822399 CPU:00 THREAD :THRECEIVE pid:1 tid:7
t:0x4f8225bd CPU:00 THREAD :THCREATE pid:1 tid:8
t:0x4f8226ac CPU:00 THREAD :THRECEIVE pid:1 tid:8
t:0x4f8228ca CPU:00 THREAD :THCREATE pid:1 tid:10
t:0x4f8229b9 CPU:00 THREAD :THRECEIVE pid:1 tid:10
t:0x4f822b7d CPU:00 THREAD :THCREATE pid:1 tid:11
t:0x4f822c6c CPU:00 THREAD :THRECEIVE pid:1 tid:11
t:0x4f822dd7 CPU:00 THREAD :THCREATE pid:1 tid:12
t:0x4f822ec6 CPU:00 THREAD :THRECEIVE pid:1 tid:12
t:0x4f8230ac CPU:00 THREAD :THCREATE pid:1 tid:15
t:0x4f82319b CPU:00 THREAD :THRECEIVE pid:1 tid:15
t:0x4f8233ca CPU:00 THREAD :THCREATE pid:1 tid:20
t:0x4f8234b9 CPU:00 THREAD :THRECEIVE pid:1 tid:20
t:0x4f823ad0 CPU:00 PROCESS :PROCCREATE_NAME
ppid:1
pid:2
name:sbin/tinit
t:0x4f823f38 CPU:00 THREAD :THCREATE pid:2 tid:1
t:0x4f82402e CPU:00 THREAD :THREPLY pid:2 tid:1
t:0x4f82447d CPU:00 PROCESS :PROCCREATE_NAME
ppid:2
pid:4099
name:proc/boot/pci-bios
t:0x4f824957 CPU:00 THREAD :THCREATE pid:4099 tid:1
t:0x4f824a4d CPU:00 THREAD :THRECEIVE pid:4099 tid:1
t:0x4f824ff8 CPU:00 PROCESS :PROCCREATE_NAME
ppid:2
pid:4100
name:proc/boot/slogger
The sample above shows the creation and naming of the instrumented kernel
procnto-smp-instr (process ID 1) and its threads (thread ID 1 is the idle thread),
followed by tinit (process ID 2), pci-bios, and slogger. Some of these are the
processes that were launched when you booted your system.
This continues for a while, culminating in the creation of the tracelogger process
and our own program, all_classes (process ID 1511472):
t:0x4f852aa8 CPU:00 PROCESS :PROCCREATE_NAME
ppid:426015
pid:1507375
name:usr/sbin/tracelogger
t:0x4f853360 CPU:00 THREAD :THCREATE pid:1507375 tid:1
t:0x4f853579 CPU:00 THREAD :THRECEIVE pid:1507375 tid:1
t:0x4f85392a CPU:00 THREAD :THCREATE pid:1507375 tid:2
t:0x4f853a19 CPU:00 THREAD :THSIGWAITINFO pid:1507375 tid:2
t:0x4f853d96 CPU:00 PROCESS :PROCCREATE_NAME
ppid:426022
pid:1511472
name:./all_classes
t:0x4f854048 CPU:00 THREAD :THCREATE pid:1511472 tid:1
t:0x4f854140 CPU:00 THREAD :THRUNNING pid:1511472 tid:1
Why doesn't the trace doesn't include the entry to TraceEvent()? Well, tracelogger
didn't log anything until our program told it to — by calling TraceEvent()!
You can see that a thread is being destroyed, but which one? The tid of -1 refers to
the current thread, but which process does it belong to? As mentioned earlier, most
of the events don't indicate what caused the event to occur; you have to infer from a
previous thread-running event. In this case, it's our own program (process ID 1511472)
that's ending; it starts the tracing, and then exits. Thread 1 of procnto-smp-instr
(the idle thread) runs.
The SND_PULSE_EXE event indicates that a SIGEV_PULSE was sent to the server
connection ID 0x40000002 of procnto-smp-instr, but what is it, and who sent
it? Thread 12 of the kernel receives it, and then surprisingly creates a new thread 1
in our process (ID 1511472), and starts chatting with it. What we're seeing here is
the teardown of our process. It delivers a death pulse to the kernel, and then one of
the kernel's threads receives the pulse and creates a thread in the process to clean
up.
In the midst of this teardown, an interrupt occurs, its handler runs, and a message is
sent to the process with ID 159762. By looking at the initial system information, we
can determine that process ID 159762 is devc-pty.
Farther down in the trace is the actual death of our all_classes process:
t:0x4f8faa68 CPU:00 THREAD :THRUNNING pid:1 tid:20
t:0x4f8fb09f CPU:00 COMM :REC_PULSE scoid:0x40000002 pid:1
t:0x4f8ff1a5 CPU:00 PROCESS :PROCDESTROY ppid:426022 pid:1511472
As you can tell from a very short look at this trace, wading through a trace can be
time-consuming, but can give you a great understanding of what exactly is happening
in your system.
You can simplify your task by terminating any processes that you don't want to include
in the trace, or by filtering the trace data.
If you want to create your own parser, consider the structure of traceprinter as a
starting point. This utility consists of a long list of callback definitions, followed by a
fairly simple parsing procedure. Each of the callback definitions is for printing.
The following sections give a brief introduction to the building blocks to the parser,
and some of the issues you'll need to handle.
1. Initialize the traceparser library by calling traceparser_init(). You can also use this
function to get the state of your parser.
2. Set the traceparser debug mode and specify a FILE stream for the debugging
output by calling traceparser_debug().
3. Set up callbacks for processing the trace events that you're interested in:
traceparser_cs()
traceparser_cs_range()
When you set up a callback with either of these functions, you can provide a pointer
to arbitrary user data to be passed to the callback.
4. Start parsing your trace data by calling traceparser()
5. Destroy your parser by calling traceparser_destroy()
You can get information about your parser at any time by calling traceparser_get_info().
For more information about these functions, see their entries in the QNX Neutrino C
Library Reference.
A simple event is an event that can be described in a single event buffer slot; a combine
event is an event that is larger and can be fully described only in multiple event buffer
slots. Both simple and combine events consist of only one kernel event.
The traceevent_t structure is only 16 bytes long, and only half of that describes
the event. This small size reduces instrumentation overhead and improves granularity.
Where the information required to represent the event won't fit into a single
traceevent_t structure, it spans as many traceevent_t structures as required,
resulting in a combine event. A combine event isn't actually several events combined,
but rather a single, long event requiring a combination of traceevent_t elements
to represent it.
Adding this “thin” protocol doesn't burden the instrumented kernel and keeps the
traceevent_t structure small. The trade-off is that it may take many traceevent_t
structures to represent a single kernel event.
Event interlacing
Although events are timestamped immediately, they may not be written to the buffer
in one single operation (atomically). When multiple buffer slot events (“combine
events”) are being written to the buffer, the process is frequently interrupted in order
to allow other threads and processes to run. Events triggered by higher-priority threads
are often written to the buffer first. Thus, events may be interlaced. Although events
may not be contiguous, they are not scrambled (unless there's a buffer overrun.) The
sequential order of the combine event is always correct, even if it's interrupted with
a different event.
In order to maintain speed during runtime, the instrumented kernel writes events
unsorted as quickly as possible; reassembling the combine events must be done in
post-processing. The libtraceparser API transparently reassembles the events.
Timestamps
The timestamp is the 32 Least Significant Bits (LSB) part of the 64-bit clock. Whenever
the 32-bit portion of the clock rolls over, a _NTO_TRACE_CONTROLTIME control event
is issued. Although adjacent events will never have the same exact timestamp, there
may be some timestamp duplication due to the clock's rolling over.
The rollover control event includes the 32 Most Significant Bits (MSB), so you can
reassemble the full clock time, if required. The timestamp includes only the LSB in
order to reduce the amount of data being generated. (A 1-GHz clock rolls over every
4.29 seconds—an eternity compared to the number of events generated.)
Although the majority of events are stored chronologically, you shouldn't write
code that depends on events being retrieved chronologically. Some multiple
buffer slot events (combine events) may be interlaced with others with leading
timestamps. In the case of buffer overruns, the timestamps will definitely be
scrambled, with entire blocks of events out of chronological order. Spurious
gaps, while theoretically possible, are very unlikely.
This chapter leads you through some tutorials to help you learn how to use TraceEvent()
to control event tracing.
1. Compile the specified C program into a file of the same name, without the .c
extension.
2. Run the specified tracelogger command. Because we're running tracelogger
in daemon mode, it doesn't start logging events until our program tells it to. This
means that you don't have to rush to start your C program; the tracing waits for
you.
The default number of buffers is 32, which produces a rather large file, so we'll
use the -n option to limit the number of buffers to a reasonable number. Feel free
to use the default, but expect a large file.
3. In a separate terminal window, run the compiled C program. Some examples use
options.
4. Watch the first terminal window; a few seconds after you start your C program,
tracelogger will finish running.
5. If you run the program, it generates its own sample result file. The “tracebuffer”
files are binary files that can be interpreted only with the libtraceparser library,
which the traceprinter utility uses.
If you don't want to run the program, take a look at our traceprinter output.
(Note that different versions and systems will create slightly different results.)
You may include these samples in your code as long as you comply with the
license agreement.
To reduce repetition and keep the programs simple, we've put some functionality into
a header file, instrex.h:
/*
* $QNXLicenseC:
* Copyright 2007, QNX Software Systems. All Rights Reserved.
*
* You must obtain a written license from and pay applicable license fees to QNX
* Software Systems before you may reproduce, modify or distribute this software,
* or any work that includes all or part of this software. Free development
* licenses are available for evaluation and non-commercial purposes. For more
* information visit http://licensing.qnx.com or email [email protected].
*
* This file may contain contributions from others. Please review this entire
* file for other proprietary rights or license notices, as well as the QNX
* Development Suite License Guide at http://licensing.qnx.com/license-guide/
* for other information.
* $
*/
/*
* instrex.h instrumentation examples - public definitions
*
*/
#ifndef __INSTREX_H_INCLUDED
#include <errno.h>
#include <stdio.h>
#include <string.h>
/*
* Supporting macro that intercepts and prints a possible
* error state during calling TraceEvent(...)
*
* Call TRACE_EVENT(TraceEvent(...)) <=> TraceEvent(...)
*
*/
#define TRACE_EVENT(prog_name, trace_event) \
if((int)((trace_event))==(-1)) \
{ \
(void) fprintf \
( \
stderr, \
"%s: line:%d function call TraceEvent() failed, errno(%d): %s\n", \
prog_name, \
__LINE__, \
errno, \
strerror(errno) \
); \
\
return (-1); \
}
/*
* Prints error message
*/
#define TRACE_ERROR_MSG(prog_name, msg) \
(void) fprintf(stderr,"%s: %s\n", prog_name, msg)
#define __INSTREX_H_INCLUDED
#endif
You'll have to save instrex.h in the same directory as the C code in order to compile
the programs.
In our first example, we'll set up daemon mode to gather all events from all classes.
Here's the source, all_classes.c:
/*
* $QNXLicenseC:
* Copyright 2007, QNX Software Systems. All Rights Reserved.
*
* You must obtain a written license from and pay applicable license fees to QNX
* Software Systems before you may reproduce, modify or distribute this software,
* or any work that includes all or part of this software. Free development
* licenses are available for evaluation and non-commercial purposes. For more
* information visit http://licensing.qnx.com or email [email protected].
*
* This file may contain contributions from others. Please review this entire
* file for other proprietary rights or license notices, as well as the QNX
* Development Suite License Guide at http://licensing.qnx.com/license-guide/
* for other information.
* $
*/
#ifdef __USAGE
%C - instrumentation example
#include <sys/trace.h>
#include "instrex.h"
/*
* Set fast emitting mode for all classes and
* their events.
* Wide emitting mode could have been
* set instead, using:
*
* TraceEvent(_NTO_TRACE_SETALLCLASSESWIDE)
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_SETALLCLASSESFAST));
/*
* Intercept all event classes
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_ADDALLCLASSES));
/*
* Start tracing process
*
* During the tracing process, the tracelogger (which
* is being executed in a daemon mode) will log all events.
* You can specify the number of iterations (i.e. the
* number of kernel buffers logged) when you start tracelogger.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_START));
/*
* The main() of this execution flow returns.
./all_classes
Despite how quickly the program ran, the amount of data it generated is rather
overwhelming.
...
...
This example demonstrates the capability of the trace module to capture huge amounts
of data about the events. The first part of the trace data is the initial state information
about all the running processes; to suppress it, start the tracing with
_NTO_TRACE_STARTNOSTATE instead of _NTO_TRACE_START.
While it's good to know how to gather everything, we'll clearly need to be able to refine
our search.
Now we'll gather all events from only one class, _NTO_TRACE_THREAD. This class is
arbitrarily chosen to demonstrate filtering by classes; there's nothing particularly
special about this class versus any other. For a full list of the possible classes, see
“Classes and events (p. 24)” in the Events and the Kernel chapter in this guide.
#ifdef __USAGE
%C - instrumentation example
#include <sys/trace.h>
#include "instrex.h"
/*
* Intercept only thread events
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_ADDCLASS, _NTO_TRACE_THREAD));
/*
* Start tracing process
*
* During the tracing process, the tracelogger (which
* is being executed in daemon mode) will log all events.
* You can specify the number of iterations (i.e. the
* number of kernel buffers logged) when you start tracelogger.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_START));
/*
* The main() of this execution flow returns.
./one_class
...
Now that we can gather specific classes of events, we'll refine our search even further
and gather only five specific types of events from four classes.
#ifdef __USAGE
%C - instrumentation example
#include <sys/trace.h>
#include <sys/kercalls.h>
#include "instrex.h"
/*
* Set wide emitting mode
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_SETALLCLASSESWIDE));
/*
* Intercept two events from class _NTO_TRACE_THREAD
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENT, _NTO_TRACE_THREAD, _NTO_TRACE_THRUNNING)
);
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENT, _NTO_TRACE_THREAD, _NTO_TRACE_THCREATE)
);
/*
/*
* Intercept one event from class _NTO_TRACE_INTENTER
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENT, _NTO_TRACE_INTENTER, _NTO_TRACE_INTFIRST)
);
/*
* Intercept one event from class _NTO_TRACE_KERCALLEXIT,
* event __KER_MSG_READV.
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENT, _NTO_TRACE_KERCALLEXIT, __KER_MSG_READV)
);
/*
* Start tracing process
*
* During the tracing process, the tracelogger (which
* is being executed in a daemon mode) will log all events.
* You can specify the number of iterations (i.e. the
* number of kernel buffers logged) when you start tracelogger.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_START));
/*
* The main() of this execution flow returns.
* However, the main() function of the tracelogger
* will return after registering the specified number
* of events.
*/
return (0);
}
./five_events
...
...
t:0x2e77ebc5 CPU:00
THREAD :THRUNNING pid:1613871 tid:1 priority:10 policy:2
t:0x2e78598d CPU:00
THREAD :THRUNNING pid:8200 tid:5 priority:10 policy:3
t:0x2e7ac4fc CPU:00
INT_ENTR:0x00000000 (0) IP:0xb8229f61
t:0x2e7cec3b CPU:00
KER_EXIT:MSG_READV/16
rbytes:22540
rmsg:"" (0x1a15080f 0x6e696273 0x6e69742f)
t:0x2e7da478 CPU:00 THREAD :THRUNNING pid:1003562 tid:1 priority:10 policy:2
t:0x2e7dc288 CPU:00 THREAD :THRUNNING pid:1 tid:15 priority:10 policy:2
...
We've now begun to selectively pick and choose events—the massive amount of data
is now much more manageable.
The kernel calls are arguably the most important class of calls. This example shows
not only filtering, but also the arguments intercepted by the instrumented kernel. In
its base form, this program is similar to the one_class.c example that gathered
only one class.
#ifdef __USAGE
%C - instrumentation example
%C - [-n num]
Options:
-n <num> kernel call number to be intercepted
(default is all)
#include <sys/trace.h>
#include <unistd.h>
#include <stdlib.h>
#include "instrex.h"
return (-1);
}
}
/*
* Just in case, turn off all filters, since we
* don't know their present state - go to the
* known state of the filters.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_DELALLCLASSES));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_KERCALL));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_KERCALL));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_THREAD));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_THREAD));
/*
* Set wide emitting mode for all classes and
* their events.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_SETALLCLASSESWIDE));
/*
* Intercept _NTO_TRACE_THREAD class
* We need it to know the state of the active thread.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_ADDCLASS, _NTO_TRACE_THREAD));
/*
* Add all/one kernel call
*/
if(call_num != (-1)) {
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENT, _NTO_TRACE_KERCALL, call_num)
);
} else {
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDCLASS, _NTO_TRACE_KERCALL)
);
}
/*
* Start tracing process
*
* During the tracing process, the tracelogger (which
* is being executed in a daemon mode) will log all events.
* You can specify the number of iterations (i.e. the
* number of kernel buffers logged) when you start tracelogger.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_START));
/*
* The main() of this execution flow returns.
* However, the main() function of the tracelogger
* will return after registering the specified number
* of events.
*/
return (0);
}
./ker_calls
...
t:0x463d59b6 CPU:00
THREAD :THSIGWAITINFO pid:1658927 tid:2 priority:10 policy:2
t:0x463d5cb2 CPU:00
THREAD :THCREATE pid:1663024 tid:1
t:0x463d5da7 CPU:00
THREAD :THRUNNING pid:1663024 tid:1 priority:10 policy:2
t:0x463d666e CPU:00
KER_EXIT:TRACE_EVENT/01 ret_val:0x00000000 empty:0x00000000
t:0x463d8e65 CPU:00
KER_CALL:THREAD_DESTROY/47
tid:-1
priority:-1
status_p:0
t:0x463da615 CPU:00 KER_EXIT:THREAD_DESTROY/47 ret_val:0x00000030 empty:0x00000000
t:0x463daf0a CPU:00 KER_CALL:THREAD_DESTROYALL/48 empty:0x00000000 empty:0x00000000
t:0x463db531 CPU:00 THREAD :THDESTROY pid:1663024 tid:1
t:0x463dc114 CPU:00 THREAD :THDEAD pid:1663024 tid:1 priority:10 policy:2
t:0x463dc546 CPU:00 THREAD :THRUNNING pid:1 tid:1 priority:0 policy:1
t:0x463df45d CPU:00 THREAD :THRUNNING pid:1 tid:4 priority:10 policy:2
t:0x463dfa7f CPU:00 THREAD :THREADY pid:1 tid:1 priority:0 policy:1
t:0x463e36b4 CPU:00 KER_CALL:THREAD_CREATE/46
pid:1663024
func_p:f0023170
arg_p:eff4e000
flags:0x00000000
stacksize:10116
stackaddr_p:eff4e264
exitfunc_p:0
policy:0
sched_priority:0
sched_curpriority:0
param.__ss_low_priority:0
param.__ss_max_repl:0
param.__ss_repl_period.tv_sec:0
param.__ss_repl_period.tv_nsec:0
param.__ss_init_budget.tv_sec:0
param.__ss_init_budget.tv_nsec:0
param.empty:0
param.empty:0
guardsize:0
empty:0
empty:0
empty:0
t:0x463e50b0 CPU:00 THREAD :THCREATE pid:1663024 tid:1
t:0x463e51d0 CPU:00 THREAD :THWAITTHREAD pid:1 tid:4 priority:10 policy:2
t:0x463e5488 CPU:00 THREAD :THRUNNING pid:1663024 tid:1 priority:10 policy:2
t:0x463e6408 CPU:00 THREAD :THREADY pid:1 tid:4 priority:10 policy:2
...
The ker_calls.c program takes a -n option that lets us view only one type of kernel
call. Let's run this program again, specifying the number 14, which signifies
__KER_MSG_RECEIVE. For a full list of the values associated with the -n option, see
/usr/include/sys/kercalls.h.
./ker_calls -n 14
TRACE_MACHINE:: x86pc
TRACE_SYSPAGE_LEN:: 2264
TRACE_TRACELOGGER_ARGS:: tracelogger -d1 -n 3 -f ker_calls.14.kev
-- KERNEL EVENTS --
t:0x73bf28d0 CPU:00 CONTROL: BUFFER sequence = 62, num_events = 714
t:0x73bf28d0 CPU:00 THREAD :THCREATE pid:1 tid:1
t:0x73bf2e16 CPU:00 THREAD :THREADY pid:1 tid:1 priority:0 policy:1
t:0x73bf3203 CPU:00 THREAD :THCREATE pid:1 tid:2
...
t:0x73c21746 CPU:00
THREAD :THRUNNING pid:1 tid:1 priority:0 policy:1
t:0x73c24352 CPU:00
THREAD :THRUNNING pid:1 tid:15 priority:10 policy:2
t:0x73c247e0 CPU:00
THREAD :THREADY pid:1 tid:1 priority:0 policy:1
t:0x73c2547b CPU:00
KER_EXIT:MSG_RECEIVEV/14
rcvid:0x00000000
rmsg:"" (0x00000000 0x00000081 0x001dd030)
info->nd:0
info->srcnd:0
info->pid:1953840
info->tid:1
info->chid:1
info->scoid:1073741874
info->coid:1073741824
info->msglen:0
info->srcmsglen:56
info->dstmsglen:24
info->priority:10
info->flags:0
info->reserved:0
t:0x73c29270 CPU:00 THREAD :THCREATE pid:1953840 tid:1
t:0x73c293ca CPU:00 THREAD :THWAITTHREAD pid:1 tid:15 priority:10 policy:2
t:0x73c2964a CPU:00 THREAD :THRUNNING pid:1953840 tid:1 priority:10 policy:2
t:0x73c2a36c CPU:00 THREAD :THREADY pid:1 tid:15 priority:10 policy:2
t:0x73c2fccc CPU:00 THREAD :THREPLY pid:1953840 tid:1 priority:10 policy:2
t:0x73c30f6b CPU:00 THREAD :THREADY pid:159762 tid:1 priority:10 policy:3
t:0x73c311b0 CPU:00 THREAD :THRUNNING pid:159762 tid:1 priority:10 policy:3
t:0x73c31835 CPU:00 KER_EXIT:MSG_RECEIVEV/14
rcvid:0x0000004f
rmsg:"" (0x00040116 0x00000000 0x00000004)
info->nd:0
info->srcnd:0
info->pid:1953840
info->tid:1
info->chid:1
info->scoid:1073741903
info->coid:0
info->msglen:4
info->srcmsglen:4
info->dstmsglen:0
info->priority:10
info->flags:0
info->reserved:0
t:0x73c3a359 CPU:00 THREAD :THREADY pid:1953840 tid:1 priority:10 policy:2
t:0x73c3af50 CPU:00 KER_CALL:MSG_RECEIVEV/14 chid:0x00000001 rparts:1
t:0x73c3b25e CPU:00 THREAD :THRECEIVE pid:159762 tid:1 priority:10 policy:3
...
In this example, we intercept two events from two different classes. Each event has
an event handler attached to it; the event handlers are closing and opening the stream.
Here's the source, eh_simple.c:
/*
* $QNXLicenseC:
* Copyright 2007, QNX Software Systems. All Rights Reserved.
*
* You must obtain a written license from and pay applicable license fees to QNX
* Software Systems before you may reproduce, modify or distribute this software,
* or any work that includes all or part of this software. Free development
* licenses are available for evaluation and non-commercial purposes. For more
* information visit http://licensing.qnx.com or email [email protected].
*
* This file may contain contributions from others. Please review this entire
* file for other proprietary rights or license notices, as well as the QNX
* Development Suite License Guide at http://licensing.qnx.com/license-guide/
* for other information.
* $
*/
#ifdef __USAGE
%C - instrumentation example
tracelogger -n 1 -d1
#include <unistd.h>
#include <sys/trace.h>
#include <sys/kercalls.h>
#include "instrex.h"
/*
* Prepare event structure where the event data will be
* stored and passed to an event handler.
*/
event_data_t e_d_1;
uint32_t data_array_1[20]; /* 20 elements for potential args. */
event_data_t e_d_2;
uint32_t data_array_2[20]; /* 20 elements for potential args. */
/*
* Global state variable that controls the
* event flow between two events
*/
int g_state;
/*
* Event handler attached to the event __KER_MSG_SENDV
* from the _NTO_TRACE_KERCALL class.
*/
int call_msg_send_eh(event_data_t* e_d)
{
if(g_state) {
g_state = !g_state;
return (1);
}
return (0);
}
/*
* Event handler attached to the event _NTO_TRACE_THRUNNING
* from the _NTO_TRACE_THREAD (thread) class.
*/
return (0);
}
/*
* Just in case, turn off all filters, since we
* don't know their present state - go to the
* known state of the filters.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_DELALLCLASSES));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_KERCALL));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_KERCALL));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSPID, _NTO_TRACE_THREAD));
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_CLRCLASSTID, _NTO_TRACE_THREAD));
/*
* Set fast emitting mode
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_SETALLCLASSESFAST));
/*
* Obtain I/O privileges before adding event handlers
*/
if (ThreadCtl(_NTO_TCTL_IO, 0)!=EOK) { /* obtain I/O privileges */
(void) fprintf(stderr, "argv[0]: Failed to obtain I/O privileges\n");
return (-1);
}
/*
* Intercept one event from class _NTO_TRACE_KERCALL,
* event __KER_MSG_SENDV.
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENT, _NTO_TRACE_KERCALLENTER, __KER_MSG_SENDV)
);
/*
* Add event handler to the event __KER_MSG_SENDV
* from _NTO_TRACE_KERCALL class.
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENTHANDLER, _NTO_TRACE_KERCALLENTER,
__KER_MSG_SENDV, call_msg_send_eh, &e_d_1)
);
/*
* Intercept one event from class _NTO_TRACE_THREAD
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENT, _NTO_TRACE_THREAD, _NTO_TRACE_THRUNNING)
);
/*
* Add event event handler to the _NTO_TRACE_THRUNNING event
* from the _NTO_TRACE_THREAD (thread) class.
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_ADDEVENTHANDLER, _NTO_TRACE_THREAD,
_NTO_TRACE_THRUNNING, thread_run_eh, &e_d_2)
);
/*
* Start tracing process
*
* During the tracing process, the tracelogger (which
* is being executed in a daemon mode) will log all events.
* The number of iterations has been specified as 1.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_START));
/*
* During one second collect all events
*/
(void) sleep(1);
/*
* Stop tracing process by closing the event stream.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_STOP));
/*
/*
* Delete event handlers before exiting to avoid execution
* in the missing address space.
*/
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_DELEVENTHANDLER, _NTO_TRACE_KERCALLENTER, __KER_MSG_SENDV)
);
TRACE_EVENT
(
argv[0],
TraceEvent(_NTO_TRACE_DELEVENTHANDLER, _NTO_TRACE_THREAD, _NTO_TRACE_THRUNNING)
);
/*
* Wait one second before terminating to hold the address space
* of the event handlers.
*/
(void) sleep(1);
return (0);
}
./eh_simple
...
This is an important example because it demonstrates the use of the dynamic rules
filter to perform tasks beyond basic filtering.
This example demonstrates the insertion of a user event into the event stream. Here's
the source, usr_event_simple.c:
/*
* $QNXLicenseC:
* Copyright 2007, QNX Software Systems. All Rights Reserved.
*
* You must obtain a written license from and pay applicable license fees to QNX
* Software Systems before you may reproduce, modify or distribute this software,
* or any work that includes all or part of this software. Free development
* licenses are available for evaluation and non-commercial purposes. For more
* information visit http://licensing.qnx.com or email [email protected].
*
* This file may contain contributions from others. Please review this entire
* file for other proprietary rights or license notices, as well as the QNX
* Development Suite License Guide at http://licensing.qnx.com/license-guide/
* for other information.
* $
*/
#ifdef __USAGE
%C - instrumentation example
#include <sys/trace.h>
#include <unistd.h>
#include "instrex.h"
/*
* Set fast emitting mode for all classes and
* their events.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_SETALLCLASSESFAST));
/*
* Intercept all event classes
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_ADDALLCLASSES));
/*
* Start tracing process
*
* During the tracing process, the tracelogger (which
* is being executed in a daemon mode) will log all events.
* You can specify the number of iterations (i.e. the
* number of kernel buffers logged) when you start tracelogger.
*/
TRACE_EVENT(argv[0], TraceEvent(_NTO_TRACE_START));
/*
/*
* The main() of this execution flow returns.
* However, the main() function of the tracelogger
* will return after registering the specified number
* of events.
*/
return (0);
}
./usr_event_simple
...
...
Inserting your own events lets you flag events or bracket groups of events to isolate
them for study. It's also useful for inserting internal, customized information into the
event stream.
This appendix provides a table that lists all the trace events and summarizes the data
included for each in both wide and fast modes.
As an example, let's look at the events for MsgSend(), MsgSendv(), and MsgSendvs().
As mentioned above, the information is the same for the restartable versions of these
functions too.
Here's what the table gives for the entry (_NTO_TRACE_KERCALLENTER) to these
functions:
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_SENDV
Fast: coid, msg
Wide: coid, sparts, rparts, msg[0], msg[1], msg[2]
Call: MsgSend,MsgSendv,MsgSendvs
#Args: MSG_SENDV, fHcoid, Dsparts, Drparts, fSmsg, s, s
This part describes the __KER_MSG_SENDV trace event that's emitted on entry to the
function. In fast mode, the event includes the following data:
Connection ID 4 bytes
Connection ID 4 bytes
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_SENDV
Fast: status, rmsg[0]
Wide: status, rmsg[0], rmsg[1], rmsg[2]
Call: MsgSend,MsgSendv,MsgSendvs
#Args: MSG_SENDV, fDstatus, fSrmsg, s, s
In fast mode, the event includes the following data if the kernel call was successful:
In wide mode, the event includes the following data if the kernel call was successful:
In both fast and wide mode, the event includes the following data if the kernel call
failed:
Fast and wide mode data Number of bytes for the event
This line indicates how traceprinter displays the data associated with the event.
The format codes are as follows:
Code Format
P Pointer
N Named string
For example, fHcoid indicates that the connection ID (coid) is displayed as a 32-bit
hexadecimal number, and it's included in fast mode (and wide mode).
Table of events
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_BAD
Fast: empty, empty
Wide: empty, empty
Call: N/A
#Args: BAD, fHempty, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_BAD
Fast: ret_val, empty
Wide: ret_val, empty
Call: N/A
#Args: BAD, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CACHE_FLUSH
Fast: addr, nlines
Wide: addr, nlines, flags, index
Call: CacheFlush
#Args: CACHE_FLUSH, fHaddr, fHnlines, Hflags, Dindex
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CACHE_FLUSH
Fast: ret_val, empty
Wide: ret_val, empty
Call: CacheFlush
#Args: CACHE_FLUSH, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CHANNEL_CREATE
Fast: flags, empty
Wide: flags, empty
Call: ChannelCreate
#Args: CHANNEL_CREATE, fHflags, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CHANNEL_CREATE
Fast: chid, empty
Wide: chid, empty
Call: ChannelCreate
#Args: CHANNEL_CREATE, fHchid, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CHANNEL_DESTROY
Fast: chid, empty
Wide: chid, empty
Call: ChannelDestroy
#Args: CHANNEL_DESTROY, fHchid, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CHANNEL_DESTROY
Fast: ret_val, empty
Wide: ret_val, empty
Call: ChannelDestroy
#Args: CHANNEL_DESTROY, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CHANCON_ATTR
Fast: chid, flags
Wide: chid, flags, new_attr
Call: ChannelConnectAttr
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CHANCON_ATTR
Fast: chid, flags
Wide: chid, flags, old_attr
Call: ChannelConnectAttr
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CLOCK_ADJUST
Fast: id, new->tick_count
Wide: id, new->tick_count, new->tick_nsec_inc
Call: ClockAdjust
#Args: CLOCK_ADJUST, fDid, fDnew->tick_count, Dnew->tick_nsec_inc
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CLOCK_ADJUST
Fast: ret_val, old->tick_count
Wide: ret_val, old->tick_count, old->tick_nsec_inc
Call: ClockAdjust
#Args: CLOCK_ADJUST, fDret_val, fDold->tick_count, Dold->tick_nsec_inc
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CLOCK_ID
Fast: pid, tid
Wide: pid, tid
Call: ClockId
#Args: CLOCK_ID, fDpid, fDtid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CLOCK_ID
Fast: ret_val, empty
Wide: ret_val, empty
Call: ClockId
#Args: CLOCK_ID, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CLOCK_PERIOD
Fast: id, new->nsec
Wide: id, new->nsec, new->fract
Call: ClockPeriod
#Args: CLOCK_PERIOD, fDid, fDnew->nsec, Dnew->fract
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CLOCK_PERIOD
Fast: ret_val, old->nsec
Wide: ret_val, old->nsec, old->fract
Call: ClockPeriod
#Args: CLOCK_PERIOD, fDret_val, fDold->nsec, Dold->fract
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CLOCK_TIME
Fast: id, new(sec)
Wide: id, new(sec), new(nsec)
Call: ClockTime
#Args: CLOCK_TIME, fDid, fDnew(sec), Dnew(nsec)
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CLOCK_TIME
Fast: ret_val, old(sec)
Wide: ret_val, old(sec), old(nsec)
Call: ClockTime
#Args: CLOCK_TIME, fDret_val, fDold(sec), Dold(nsec)
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CONNECT_ATTACH
Fast: nd, pid
Wide: nd, pid, chid, index, flags
Call: ConnectAttach
#Args: CONNECT_ATTACH, fHnd, fDpid, Hchid, Dindex, Hflags
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CONNECT_ATTACH
Fast: coid, empty
Wide: coid, empty
Call: ConnectAttach
#Args: CONNECT_ATTACH, fHcoid, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CONNECT_CLIENT_INFO
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CONNECT_CLIENT_INFO
Fast: ret_val, info->nd
Wide: ret_val, info->nd, info->pid, info->sid, flags, info->ruid, info->euid,
info->suid, info->rgid, info->egid, info->sgid, info->ngroups,
info->grouplist[0], info->grouplist[1], info->grouplist[2],
info->grouplist[3], info->grouplist[4], info->grouplist[5],
info->grouplist[6], info->grouplist[7]
Call: ConnectClientInfo
#Args: CONNECT_CLIENT_INFO, fHscoid, fDngroups
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CONNECT_DETACH
Fast: coid, empty
Wide: coid, empty
Call: ConnectDetach
#Args: CONNECT_DETACH, fHcoid, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CONNECT_DETACH
Fast: ret_val, empty
Wide: ret_val, empty
Call: ConnectDetach
#Args: CONNECT_DETACH, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CONNECT_FLAGS
Fast: coid, bits
Wide: pid, coid, masks, bits
Call: ConnectFlags
#Args: CONNECT_FLAGS, Dpid, fHcoid, Hmasks, fHbits
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CONNECT_FLAGS
Fast: old_flags, empty
Wide: old_flags, empty
Call: ConnectFlags
#Args: CONNECT_FLAGS, fHold_flags, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_CONNECT_SERVER_INFO
Fast: pid, coid
Wide: pid, coid
Call: ConnectServerInfo
#Args: CONNECT_SERVER_INFO, fDpid, fHcoid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_CONNECT_SERVER_INFO
Fast: coid, info->nd
Wide: coid, info->nd, info->srcnd, info->pid, info->tid, info->chid,
info->scoid, info->coid, info->msglen, info->srcmsglen, info->dstmsglen,
info->priority, info->flags, info->reserved
Call: ConnectServerInfo
#Args: CONNECT_SERVER_INFO, fDpid, fHcoid
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_INTERRUPT_ATTACH
Fast: intr, flags
Wide: intr, handler_p, area_p, areasize, flags
Call: InterruptAttach
#Args: INTERRUPT_ATTACH, fDintr, Phandler_p, Parea_p, Dareasize, fHflags
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_INTERRUPT_ATTACH
Fast: int_fun_id, empty
Wide: int_fun_id, empty
Call: InterruptAttach
#Args: INTERRUPT_ATTACH, fHint_fun_id, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_INTERRUPT_DETACH
Fast: id, empty
Wide: id, empty
Call: InterruptDetach
#Args: INTERRUPT_DETACH, fDid, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_INTERRUPT_DETACH
Fast: ret_val, empty
Wide: ret_val, empty
Call: InterruptDetach
#Args: INTERRUPT_DETACH, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_INTERRUPT_DETACH_FUNC
Fast: intr, handler_p
Wide: intr, handler_p
Call: N/A
#Args: INTERRUPT_DETACH_FUNC, fDintr, fPhandler_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_INTERRUPT_DETACH_FUNC
Fast: ret_val, empty
Wide: ret_val, empty
Call: N/A
#Args: INTERRUPT_DETACH_FUNC, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_INTERRUPT_MASK
Fast: intr, id
Wide: intr, id
Call: InterruptMask
#Args: INTERRUPT_MASK, fDintr, fDid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_INTERRUPT_MASK
Fast: mask_level, empty
Wide: mask_level, empty
Call: InterruptMask
#Args: INTERRUPT_MASK, fHmask_level, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_INTERRUPT_UNMASK
Fast: intr, id
Wide: intr, id
Call: InterruptUnmask
#Args: INTERRUPT_UNMASK, fDintr, fDid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_INTERRUPT_UNMASK
Fast: mask_level, empty
Wide: mask_level, empty
Call: InterruptUnmask
#Args: INTERRUPT_UNMASK, fHmask_level, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_INTERRUPT_WAIT
Fast: flags, timeout_tv_sec
Wide: flags, timeout_tv_sec, timeout_tv_nsec
Call: InterruptWait
#Args: INTERRUPT_WAIT, fHflags, fDtimeout_tv_sec, Dtimeout_tv_nsec
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_INTERRUPT_WAIT
Fast: ret_val, empty
Wide: ret_val, empty
Call: InterruptWait
#Args: INTERRUPT_WAIT, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_INTERRUPT_CHARACTERISTIC
Fast: id, type, new
Wide: id, type, new
Call: InterruptCharacteristic
#Args: INTERRUPT_CHARACTERISTIC, fDid, fHtype, fDnew
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_INTERRUPT_CHARACTERISTIC
Fast: id, old
Wide: id, old
Call: InterruptCharacteristic
#Args: INTERRUPT_CHARACTERISTIC, fDid, fDold
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_CURRENT
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_CURRENT
Fast: empty, empty
Wide: empty, empty
Call: MsgCurrent
#Args: MSG_CURRENT, fHempty, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_PAUSE
Fast: rcvid, cookie
Wide: rcvid, cookie
Call: MsgPause
#Args: MSG_CURRENT, fHrcvid, fHcookie
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_PAUSE
Fast: empty, empty
Wide: empty, empty
Call: MsgPause
#Args: MSG_CURRENT, fHempty, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_DELIVER_EVENT
Fast: rcvid, event->sigev_notify
Wide: rcvid, event->sigev_notify, event->sigev_notify_function_p,
event->sigev_value, event->sigev_notify_attributes_p
Call: MsgDeliverEvent
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_DELIVER_EVENT
Fast: ret_val, empty
Wide: ret_val, empty
Call: MsgDeliverEvent
#Args: MSG_DELIVER_EVENT, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_ERROR
Fast: rcvid, err
Wide: rcvid, err
Call: MsgError
#Args: MSG_ERROR, fHrcvid, fDerr
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_ERROR
Fast: ret_val, empty
Wide: ret_val, empty
Call: MsgError
#Args: MSG_ERROR, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_INFO
Fast: rcvid, info_p
Wide: rcvid, info_p
Call: MsgInfo
#Args: MSG_INFO, fHrcvid, fPinfo_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_INFO
Fast: ret_val, info->nd
Wide: ret_val, info->nd, info->srcnd, info->pid, info->tid, info->chid,
info->scoid, info->coid, info->msglen, info->srcmsglen, info->dstmsglen,
info->priority, info->flags, info->reserved
Call: MsgInfo
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_KEYDATA
Fast: rcvid, op
Wide: rcvid, op
Call: MsgKeyData
#Args: MSG_KEYDATA, fHrcvid, fHop
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_KEYDATA
Fast: ret_val, newkey
Wide: ret_val, newkey
Call: MsgKeyData
#Args: MSG_KEYDATA, fHret_val, fDnewkey
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_READIOV
Fast: rcvid, offset
Wide: rcvid, parts, offset, flags
Call: MsgReadiov
#Args: MSG_READIOV, fHrcvid, Dparts, fHoffset, Hflags
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_READIOV
Fast: rbytes, rmsg[0]
Wide: rbytes, rmsg[0], rmsg[1], rmsg[2]
Call: MsgReadiov
#Args: MSG_READIOV, fDrbytes, fSrmsg, s, s
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_READV
Fast: rcvid, offset
Wide: rcvid, rmsg_p, rparts, offset
Call: MsgRead,MsgReadv
#Args: MSG_READV, fHrcvid, Prmsg_p, Drparts, fHoffset
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_READV
Fast: rbytes, rmsg[0]
Wide: rbytes, rmsg[0], rmsg[1], rmsg[2]
Call: MsgRead,MsgReadv
#Args: MSG_READV, fDrbytes, fSrmsg, s, s
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_READWRITEV
Fast: src_rcvid, dst_rcvid
Wide: src_rcvid, dst_rcvid
Call: N/A
#Args: MSG_READWRITEV, fHsrc_rcvid, fHdst_rcvid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_READWRITEV
Fast: msglen, empty
Wide: msglen, empty
Call: N/A
#Args: MSG_READWRITEV, fDmsglen, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_RECEIVEPULSEV
Fast: chid, rparts
Wide: chid, rparts
Call: MsgReceivePulse,MsgReceivePulsev
#Args: MSG_RECEIVEPULSEV, fHchid, fDrparts
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_RECEIVEPULSEV
Fast: rcvid, rmsg[0]
Wide: rcvid, rmsg[0], rmsg[1], rmsg[2], info->nd, info->srcnd, info->pid,
info->tid, info->chid, info->scoid, info->coid, info->msglen,
info->srcmsglen, info->dstmsglen, info->priority, info->flags,
info->reserved
Call: MsgReceivePulse,MsgReceivePulsev
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_RECEIVEV
Fast: chid, rparts
Wide: chid, rparts
Call: MsgReceive,MsgReceivev
#Args: MSG_RECEIVEV, fHchid, fDrparts
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_RECEIVEV
Fast: rcvid, rmsg[0]
Wide: rcvid, rmsg[0], rmsg[1], rmsg[2], info->nd, info->srcnd, info->pid,
info->tid, info->chid, info->scoid, info->coid, info->msglen,
info->srcmsglen, info->dstmsglen, info->priority, info->flags,
info->reserved
Call: MsgReceive,MsgReceivev
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_REPLYV
Fast: rcvid, status
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_REPLYV
Fast: ret_val, empty
Wide: ret_val, empty
Call: MsgReply,MsgReplyv
#Args: MSG_REPLYV, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_SEND_PULSE
Fast: coid, code
Wide: coid, priority, code, value
Call: MsgSendPulse
#Args: MSG_SEND_PULSE, fHcoid, Dpriority, fHcode, Hvalue
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_SEND_PULSE
Fast: status, empty
Wide: status, empty
Call: MsgSendPulse
#Args: MSG_SEND_PULSE, fDstatus, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_SENDV
Fast: coid, msg
Wide: coid, sparts, rparts, msg[0], msg[1], msg[2]
Call: MsgSend,MsgSendv,MsgSendvs
#Args: MSG_SENDV, fHcoid, Dsparts, Drparts, fSmsg, s, s
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_SENDV
Fast: status, rmsg[0]
Wide: status, rmsg[0], rmsg[1], rmsg[2]
Call: MsgSend,MsgSendv,MsgSendvs
#Args: MSG_SENDV, fDstatus, fSrmsg, s, s
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_SENDVNC
Fast: coid, msg
Wide: coid, sparts, rparts, msg[0], msg[1], msg[2]
Call: MsgSendnc,MsgSendvnc,MsgSendvsnc
#Args: MSG_SENDVNC, fHcoid, Dsparts, Drparts, fSmsg, s, s
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_SENDVNC
Fast: ret_val, rmsg[0]
Wide: ret_val, rmsg[0], rmsg[1], rmsg[2]
Call: MsgSendnc,MsgSendvnc,MsgSendvsnc
#Args: MSG_SENDVNC, fHret_val, fSrmsg, s, s
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_VERIFY_EVENT
Fast: rcvid, event->sigev_notify
Wide: rcvid, event->sigev_notify, event->sigev_notify_function_p,
event->sigev_value, event->sigev_notify_attribute_p
Call: MsgVerifyEvent
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_VERIFY_EVENT
Fast: status, empty
Wide: status, empty
Call: MsgVerifyEvent
#Args: MSG_VERIFY_EVENT, fDstatus, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_MSG_WRITEV
Fast: rcvid, offset
Wide: rcvid, sparts, offset, msg[0], msg[1], msg[2]
Call: MsgWrite,MsgWritev
#Args: MSG_WRITEV, fHrcvid, Dsparts, fHoffset, Smsg, s, s
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_MSG_WRITEV
Fast: wbytes, empty
Wide: wbytes, empty
Call: MsgWrite,MsgWritev
#Args: MSG_WRITEV, fDwbytes, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_NET_CRED
Fast: coid, info_p
Wide: coid, info_p
Call: NetCred
#Args: NET_CRED, fHcoid, fPinfo_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_NET_CRED
Fast: ret_val, info->nd
Wide: ret_val, info->nd, info->pid, info->sid, info->flags, info->ruid,
info->euid, info->suid, info->rgid, info->egid, info->sgid, info->ngroups,
info->grouplist[0], info->grouplist[1], info->grouplist[2],
info->grouplist[3], info->grouplist[4], info->grouplist[5],
info->grouplist[6], info->grouplist[7]
Call: NetCred
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_NET_INFOSCOID
Fast: scoid, infoscoid
Wide: scoid, infoscoid
Call: NetInfoScoid
#Args: NET_INFOSCOID, fHscoid, fHinfoscoid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_NET_INFOSCOID
Fast: ret_val, empty
Wide: ret_val, empty
Call: NetInfoScoid
#Args: NET_INFOSCOID, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_NET_SIGNAL_KILL
Fast: pid, signo
Wide: cred->ruid, cred->euid, nd, pid, tid, signo, code, value
Call: NetSignalKill
#Args: NET_SIGNAL_KILL, fDstatus, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_NET_SIGNAL_KILL
Fast: status, empty
Wide: status, empty
Call: NetSignalKill
#Args: NET_SIGNAL_KILL, fDstatus, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_NET_UNBLOCK
Fast: vtid, empty
Wide: vtid, empty
Call: NetUnblock
#Args: NET_UNBLOCK, fHvtid, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_NET_UNBLOCK
Fast: ret_val, empty
Wide: ret_val, empty
Call: NetUnblock
#Args: NET_UNBLOCK, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_NET_VTID
Fast: vtid, info_p
Wide: vtid, info_p, tid, coid, priority, srcmsglen, keydata, srcnd, dstmsglen
Call: NetVtid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_NET_VTID
Fast: ret_val, empty
Wide: ret_val, empty
Call: NetVtid
#Args: NET_VTID, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_NOP
Fast: dummy, empty
Wide: dummy, empty
Call: N/A
#Args: NOP, fHdummy, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_NOP
Fast: empty, empty
Wide: empty, empty
Call: N/A
#Args: NOP, fHempty, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_RING0
Fast: func_p, arg_p
Wide: func_p, arg_p
Call: __Ring0
#Args: RING0, fPfunc_p, fParg_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_RING0
Fast: ret_val, empty
Wide: ret_val, empty
Call: __Ring0
#Args: RING0, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SCHED_GET
Fast: pid, tid
Wide: pid, tid
Call: SchedGet
#Args: SCHED_GET, fDpid, fDtid
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SCHED_GET
Fast: ret_val, sched_priority
Wide: ret_val, sched_priority, param.ss_low_priority, param.ss_max_repl,
param.ss_repl_period.tv_sec, param.ss_repl_period.tv_nsec,
param.ss_init_budget.tv_sec, param.ss_init_budget.tv_nsec
Call: SchedGet
#Args: SCHED_GET, fDpid, fDtid
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SCHED_INFO
Fast: pid, policy
Wide: pid, policy
Call: SchedInfo
#Args: SCHED_INFO, fDpid, fDpolicy
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SCHED_INFO
Fast: ret_val, priority_max
Wide: ret_val, priority_min, priority_max, interval_sec, interval_nsec, priority_priv
Call: SchedInfo
#Args: SCHED_INFO, fDpid, fDpolicy
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SCHED_SET
Fast: pid, sched_priority
Wide: pid, tid, policy, sched_priority, sched_curpriority,
param.ss_low_priority, param.ss_max_repl, param.ss_repl_period.tv_sec,
param.ss_repl_period.tv_nsec, param.ss_init_budget.tv_sec,
param.ss_init_budget.tv_nsec
Call: SchedSet
#Args: SCHED_SET, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SCHED_SET
Fast: ret_val, empty
Wide: ret_val, empty
Call: SchedSet
#Args: SCHED_SET, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SCHED_YIELD
Fast: empty, empty
Wide: empty, empty
Call: SchedYield
#Args: SCHED_YIELD, fHempty, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SCHED_YIELD
Fast: ret_val, empty
Wide: ret_val, empty
Call: SchedYield
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SIGNAL_FAULT
Fast: sigcode, addr
Wide: sigcode, addr
Call: N/A
#Args: SIGNAL_FAULT, fDsigcode, fPaddr
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SIGNAL_FAULT
Fast: ret_val, reg_1
Wide: ret_val, reg_1, reg_2, reg_3, reg_4, reg_5
Call: N/A
#Args: SIGNAL_FAULT, fHret_val, fHreg_1, Hreg_2, Hreg_3, Hreg_4, Hreg_5
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SIGNAL_KILL
Fast: pid, signo
Wide: nd, pid, tid, signo, code, value
Call: SignalKill
#Args: SIGNAL_KILL, Hnd, fDpid, Dtid, fDsigno, Hcode, Hvalue
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SIGNAL_KILL
Fast: ret_val, empty
Wide: ret_val, empty
Call: SignalKill
#Args: SIGNAL_KILL, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SIGNAL_RETURN
Fast: s_p, empty
Wide: s_p, empty
Call: SignalReturn
#Args: SIGNAL_RETURN, fPs_p, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SIGNAL_RETURN
Fast: ret_val, empty
Wide: ret_val, empty
Call: SignalReturn
#Args: SIGNAL_RETURN, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SIGNAL_SUSPEND
Fast: sig_blocked->bits[0], sig_blocked->bits[1]
Wide: sig_blocked->bits[0], sig_blocked->bits[1]
Call: SignalSuspend
#Args: SIGNAL_SUSPEND, fHsig_blocked->bits[0], fHsig_blocked->bits[1]
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SIGNAL_SUSPEND
Fast: ret_val, sig_blocked_p
Wide: ret_val, sig_blocked_p
Call: SignalSuspend
#Args: SIGNAL_SUSPEND, fHret_val, fPsig_blocked_p
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SIGNAL_WAITINFO
Fast: sig_wait->bits[0], sig_wait->bits[1]
Wide: sig_wait->bits[0], sig_wait->bits[1]
Call: SignalWaitinfo
#Args: SIGNAL_WAITINFO, fHsig_wait->bits[0], fHsig_wait->bits[1]
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SIGNAL_WAITINFO
Fast: sig_num, si_code
Wide: sig_num, si_signo, si_code, si_errno, p[0], p[1], p[2], p[3], p[4], p[5], p[6]
Call: SignalWaitinfo
#Args: SIGNAL_WAITINFO, fHsig_wait->bits[0], fHsig_wait->bits[1]
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_CONDVAR_SIGNAL
Fast: sync_p, all
Wide: sync_p, all, sync->count, sync->owner
Call: SyncCondvarSignal
#Args: SYNC_CONDVAR_SIGNAL, fPsync_p, fDall, Dsync->count, Dsync->owner
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_CONDVAR_SIGNAL
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncCondvarSignal
#Args: SYNC_CONDVAR_SIG, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_CONDVAR_WAIT
Fast: sync_p, mutex_p
Wide: sync_p, mutex_p, sync->count, sync->owner, mutex->count, mutex->owner
Call: SyncCondvarWait
#Args: SYNC_CONDVAR_WAIT, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_CONDVAR_WAIT
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncCondvarWait
#Args: SYNC_CONDVAR_WAIT, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_CREATE
Fast: type, sync_p
Wide: type, sync_p, count, owner, protocol, flags, prioceiling, clockid
Call: SyncCreate
#Args: SYNC_CREATE, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_CREATE
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncCreate
#Args: SYNC_CREATE, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_CTL
Fast: cmd, sync_p
Wide: cmd, sync_p, data_p, count, owner
Call: SyncCtl
#Args: SYNC_CTL, fDcmd, fPsync_p, Pdata_p, Dcount, Downer
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_CTL
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncCtl
#Args: SYNC_CTL, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_DESTROY
Fast: sync_p, owner
Wide: sync_p, count, owner
Call: SyncDestroy
#Args: SYNC_DESTROY, fPsync_p, Dcount, fDowner
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_DESTROY
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncDestroy
#Args: SYNC_DESTROY, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_MUTEX_LOCK
Fast: sync_p, owner
Wide: sync_p, count, owner
Call: SyncMutexLock
#Args: SYNC_MUTEX_LOCK, fPsync_p, Dcount, fDowner
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_MUTEX_LOCK
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncMutexLock
#Args: SYNC_MUTEX_LOCK, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_MUTEX_REVIVE
Fast: sync_p, owner
Wide: sync_p, count, owner
Call: SyncMutexRevive
#Args: SYNC_MUTEX_REVIVE, fPsync_p, Dcount, fDowner
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_MUTEX_REVIVE
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncMutexRevive
#Args: SYNC_MUTEX_REVIVE, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_MUTEX_UNLOCK
Fast: sync_p, owner
Wide: sync_p, count, owner
Call: SyncMutexUnlock
#Args: SYNC_MUTEX_UNLOCK, fPsync_p, Dcount, fDowner
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_MUTEX_UNLOCK
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncMutexUnlock
#Args: SYNC_MUTEX_UNLOCK, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_SEM_POST
Fast: sync_p, count
Wide: sync_p, count, owner
Call: SyncSemPost
#Args: SYNC_SEM_POST, fPsync_p, fDcount, Downer
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_SEM_POST
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncSemPost
#Args: SYNC_SEM_POST, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYNC_SEM_WAIT
Fast: sync_p, count
Wide: sync_p, try, count, owner
Call: SyncSemWait
#Args: SYNC_SEM_WAIT, fPsync_p, Dtry, fDcount, Downer
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYNC_SEM_WAIT
Fast: ret_val, empty
Wide: ret_val, empty
Call: SyncSemWait
#Args: SYNC_SEM_WAIT, fDret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SYS_CPUPAGE_GET
Fast: index, empty
Wide: index, empty
Call: N/A
#Args: SYS_CPUPAGE_GET, fDindex, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SYS_CPUPAGE_GET
Fast: ret_val, empty
Wide: ret_val, empty
Call: N/A
#Args: SYS_CPUPAGE_GET, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_THREAD_CANCEL
Fast: tid, canstub_p
Wide: tid, canstub_p
Call: ThreadCancel
#Args: THREAD_CANCEL, fDtid, fPcanstub_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_THREAD_CANCEL
Fast: ret_val, empty
Wide: ret_val, empty
Call: ThreadCancel
#Args: THREAD_CANCEL, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_THREAD_CREATE
Fast: func_p, arg_p
Wide: pid, func_p, arg_p, flags, stacksize, stackaddr_p, exitfunc_p, policy,
sched_priority, sched_curpriority, param.ss_low_priority, param.ss_max_repl,
param.ss_repl_period.tv_sec, param.ss_repl_period.tv_nsec,
param.ss_init_budget.tv_sec, param.ss_init_budget.tv_nsec
Call: ThreadCreate
#Args: THREAD_CREATE, fHthread_id, fHowner
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_THREAD_CREATE
Fast: thread_id, owner
Wide: thread_id, owner
Call: ThreadCreate
#Args: THREAD_CREATE, fHthread_id, fHowner
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_THREAD_CTL
Fast: cmd, data_p
Wide: cmd, data_p
Call: ThreadCtl
#Args: THREAD_CTL, fHcmd, fPdata_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_THREAD_CTL
Fast: ret_val, empty
Wide: ret_val, empty
Call: ThreadCtl
#Args: THREAD_CTL, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_THREAD_DESTROY
Fast: tid, status_p
Wide: tid, priority, status_p
Call: ThreadDestroy
#Args: THREAD_DESTROY, fDtid, Dpriority, fPstatus_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_THREAD_DESTROY
Fast: ret_val, empty
Wide: ret_val, empty
Call: ThreadDestroy
#Args: THREAD_DESTROY, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_THREAD_DESTROYALL
Fast: empty, empty
Wide: empty, empty
Call: N/A
#Args: THREAD_DESTROYALL, fHempty, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_THREAD_DESTROYALL
Fast: ret_val, empty
Wide: ret_val, empty
Call: N/A
#Args: THREAD_DESTROYALL, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_THREAD_DETACH
Fast: tid, empty
Wide: tid, empty
Call: ThreadDetach
#Args: THREAD_DETACH, fDtid, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_THREAD_DETACH
Fast: ret_val, empty
Wide: ret_val, empty
Call: ThreadDetach
#Args: THREAD_DETACH, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_THREAD_JOIN
Fast: tid, status_p
Wide: tid, status_p
Call: ThreadJoin
#Args: THREAD_JOIN, fDtid, fPstatus_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_THREAD_JOIN
Fast: ret_val, status_p
Wide: ret_val, status_p
Call: ThreadJoin
#Args: THREAD_JOIN, fHret_val, fPstatus_p
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_TIMER_CREATE
Fast: timer_id, event->sigev_notify
Wide: timer_id, event->sigev_notify, event->sigev_notify_function_p,
event->sigev_value, event->sigev_notify_attributes_p
Call: TimerCreate
#Args: TIMER_CREATE, fHtimer_id, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_TIMER_CREATE
Fast: timer_id, empty
Wide: timer_id, empty
Call: TimerCreate
#Args: TIMER_CREATE, fHtimer_id, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_TIMER_DESTROY
Fast: id, empty
Wide: id, empty
Call: TimerDestroy
#Args: TIMER_DESTROY, fHid, fHempty
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_TIMER_DESTROY
Fast: ret_val, empty
Wide: ret_val, empty
Call: TimerDestroy
#Args: TIMER_DESTROY, fHret_val, fHempty
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_TIMER_INFO
Fast: pid, id
Wide: pid, id, flags, info_p
Call: TimerInfo
#Args: TIMER_INFO, fDpid, fHid, Hflags, Pinfo_p
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_TIMER_INFO
Fast: prev_id, info->itime.nsec
Wide: prev_id, info->itime.nsec, info->itime.interval_nsec, info->otime.nsec,
info->otime.interval_nsec, info->flags, info->tid, info->notify,
info->clockid, info->overruns, info->event.sigev_notify,
info->event.sigev_notify_function_p, info->event.sigev_value,
info->event.sigev_notify_attributes_p
Call: TimerInfo
#Args: TIMER_INFO, fDpid, fHid, Hflags, Pinfo_p
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_TRACE_EVENT
Fast: mode, class
Wide: mode, class, event, data_1, data_2
Call: TraceEvent
#Args: TRACE_EVENT, fHmode, fHclass[header], Hevent[time_off], Hdata_1, Hdata_2
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_TRACE_EVENT
Fast: ret_val, empty
Wide: ret_val, empty
Call: TraceEvent
#Args: TRACE_EVENT, fHret_val, fHempty
Class: _NTO_TRACE_INTENTER
Event: _NTO_TRACE_INTFIRST - _NTO_TRACE_INTLAST
Fast: IP, kernel_flag
Wide: interrupt_number, kernel_flag
Call: N/A
Class: _NTO_TRACE_INTEXIT
Event: _NTO_TRACE_INTFIRST - _NTO_TRACE_INTLAST
Fast: interrupt_number, kernel_flag
Wide: interrupt_number, kernel_flag
Call: N/A
Class: _NTO_TRACE_INT_HANDLER_ENTER
Event: _NTO_TRACE_INTFIRST - _NTO_TRACE_INTLAST
Fast: pid, interrupt_number, ip, area
Wide: pid, interrupt_number, ip, area
Call: N/A
Class: _NTO_TRACE_INT_HANDLER_EXIT
Event: _NTO_TRACE_INTFIRST - _NTO_TRACE_INTLAST
Fast: interrupt_number, sigevent
Wide: interrupt_number, sigevent
Call: N/A
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SIGNAL_ACTION
Fast: signo, act->sa_handler_p
Wide: pid, sigstub_p, signo, act->sa_handler_p, act->sa_flags,
act->sa_mask.bits[0], act->sa_mask.bits[1]
Call: SignalAction
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SIGNAL_ACTION
Fast: ret_val, act->sa_handler_p
Wide: ret_val, act->sa_handler_p, act->sa_flags, act->sa_mask.bits[0],
act->sa_mask.bits[1]
Call: SignalAction
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_SIGNAL_PROCMASK
Fast: pid, tid
Wide: pid, tid, how, sig_blocked->bits[0], sig_blocked->bits[1]
Call: SignalProcmask
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_SIGNAL_PROCMASK
Fast: ret_val, sig_blocked->bits[0]
Wide: ret_val, sig_blocked->bits[0], sig_blocked->bits[1]
Call: SignalProcmask
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_TIMER_SETTIME
Fast: clock_id, itime->nsec
Wide: clock_id, flags, itime->nsec, itime->interval_nsec
Call: TimerSettime
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_TIMER_SETTIME
Fast: ret_val, itime->nsec
Wide: ret_val, itime->nsec, itime->interval_nsec
Call: TimerSettime
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_TIMER_ALARM
Fast: clock_id, itime->nsec
Wide: clock_id, itime->nsec, itime->interval_nsec
Call: TimerAlarm
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_TIMER_ALARM
Fast: ret_val, itime->nsec
Wide: ret_val, itime->nsec, itime->interval_nsec
Call: TimerAlarm
Class: _NTO_TRACE_KERCALLENTER
Event: __KER_TIMER_TIMEOUT
Fast: clock_id, timeout_flags, ntime
Wide: clock_id, timeout_flags, ntime, event->sigev_notify,
event->sigev_notify_function_p, event->sigev_value,
event->sigev_notify_attributes_p
Call: TimerTimeout
Class: _NTO_TRACE_KERCALLEXIT
Event: __KER_TIMER_TIMEOUT
Fast: prev_timeout_flags, otime
Wide: prev_timeout_flags, otime
Call: TimerTimeout
# Control Events
Class: _NTO_TRACE_CONTROL
Event: _NTO_TRACE_CONTROLTIME
Class: _NTO_TRACE_CONTROL
Event: _NTO_TRACE_CONTROLBUFFER
Fast: buffer sequence number, num events
Wide: buffer sequence number, num events
Call: N/A
# Process Events
Class: _NTO_TRACE_PROCESS
Event: _NTO_TRACE_PROCCREATE
Fast: ppid, pid
Wide: ppid, pid
Call: N/A
Class: _NTO_TRACE_PROCESS
Event: _NTO_TRACE_PROCCREATE_NAME
Fast: ppid, pid, name
Wide: ppid, pid, name
Call: N/A
Class: _NTO_TRACE_PROCESS
Event: _NTO_TRACE_PROCDESTROY
Fast: ppid, pid
Wide: ppid, pid
Call: N/A
Class: _NTO_TRACE_PROCESS
Event: _NTO_TRACE_PROCDESTROY_NAME
Fast: ppid, pid, name
Wide: ppid, pid, name
Call: N/A
Class: _NTO_TRACE_PROCESS
Event: _NTO_TRACE_PROCTHREAD_NAME
Fast: pid, tid, name
Wide: pid, tid, name
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THDEAD
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THRUNNING
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THREADY
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THSTOPPED
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THSEND
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THRECEIVE
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THREPLY
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THSTACK
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THWAITTHREAD
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THWAITPAGE
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THSIGSUSPEND
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THSIGWAITINFO
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THNANOSLEEP
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THMUTEX
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THCONDVAR
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THJOIN
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THINTR
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THSEM
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THWAITCTX
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THNET_SEND
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THNET_REPLY
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THCREATE
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THDESTROY
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_THREAD
Event: _NTO_TRACE_THNET_REPLY
Fast: pid, tid
Wide: pid, tid, priority, policy, partition id, sched_flags
(incl APS_SCHED_* critical bit def'd in kermacros.h)
note: partition id and sched_flags only present if APS scheduler module
is loaded.
** note: partition id and sched_flags only present if APS scheduler module
is loaded.
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHDEAD
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHRUNNING
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHREADY
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHSTOPPED
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHSEND
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHRECEIVE
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHREPLY
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHSTACK
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHWAITTHREAD
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHWAITPAGE
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHSIGSUSPEND
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHSIGWAITINFO
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHNANOSLEEP
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHMUTEX
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHCONDVAR
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHJOIN
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHINTR
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHSEM
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHWAITCTX
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHNET_SEND
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHNET_REPLY
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHCREATE
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHDESTROY
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_VTHREAD
Event: _NTO_TRACE_VTHNET_REPLY
Fast: pid, tid
Wide: pid, tid
Call: N/A
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_SMSG
Fast: rcvid, pid
Wide: rcvid, pid
Call: N/A
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_RMSG
Fast: rcvid, pid
Wide: rcvid, pid
Call: N/A
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_REPLY
Fast: tid, pid
Wide: tid, pid
Call: N/A
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_ERROR
Fast: tid, pid
Wide: tid, pid
Call: N/A
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_SPULSE
Fast: scoid, pid
Wide: scoid, pid
Call: N/A
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_RPULSE
# SIGEV_PULSE delivered
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_SPULSE_EXE
Fast: scoid, pid
Wide: scoid, pid
Call: N/A
# _PULSE_CODE_UNBLOCK delivered
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_SPULSE_UN
Fast: scoid, pid
Wide: scoid, pid
Call: N/A
# _PULSE_CODE_NET_UNBLOCK delivered
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_SPULSE_QUN
Fast: scoid, pid
Wide: scoid, pid
Call: N/A
Class: _NTO_TRACE_COMM
Event: _NTO_TRACE_COMM_SIGNAL
Fast: si_signo, si_code
Wide: si_signo, si_code, si_errno, __data.__pad[0-6]
Call: N/A
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_PATHMGR
Fast: pid, tid, pathname
Wide: pid, tid, pathname
Call: Any pathname operation (routed via libc connect)
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_APS_NAME
Fast: partition id, partition name
Wide: partition id, partition name
Call: SchedCtl with sched_aps.h:: SCHED_APS_CREATE_PARTITION
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_APS_BUDGETS
Fast: partition id, new percentage cpu budget, new critical budget ms
Wide: partition id, new percentage cpu budget, new critical budget ms
Call: SchedCtl with sched_aps.h SCHED_APS_CREATE_PARTITION or
SCHED_APS_MODIFY_PARTITION. Also emitted automatically when APS scheduler
clears a crtical budget as part of handling a bankruptcy.
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_APS_BNKR
Fast: suspect pid, suspect tid, partition id
Wide: suspect pid, suspect tid, parition id
Call: automatically when a partition exceeds its critical budget.
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_MMAP
Fast: pid, addr (64), len (64), flags
Wide: pid, addr (64), len (64), flags, prot, fd, align (64), offset (64), name
Call: mmap/mmap64
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_MUNMAP
Fast: pid, addr (64), len (64)
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_MAPNAME
Fast: pid, addr (32), len (32), name
Wide: pid, addr (32), len (32), name
Call: dlopen
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_ADDRESS
Fast: addr(32), <null>
Wide: addr(32), <null>
Call: whenever a breakpoint is hit
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_FUNC_ENTER
Fast: thisfn(32), call_site(32)
Wide: thisfn(32), call_site(32)
Call: whenever a function is entered (and it is instrumented)
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_FUNC_EXIT
Fast: thisfn(32), call_site(32)
Wide: thisfn(32), call_site(32)
Call: whenever a function is exited (and it is instrumented)
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_SLOG
Fast: opcode(32), severity(32), message
Wide: opcode(32), severity(32), message
Call: when the kernel wants to note an unusual occurrance
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_DEFRAG_START
Fast: block_size(32)
Wide: block_size(32)
Call: when the memory defragmentation compaction_minimal algorithm is triggered
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_RUNSTATE
Fast: bitset(32) 0x1 - CPU is on/offline, 0x2 - CPU manually requested
on/offline, 0x4 CPU is dynamically offline-able or not, 0x8 system is
in runstate burst mode
Wide: same as above
Call: when the runstate for a CPU changes
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_POWER
Fast: bitset(32), mode(32)
Wide: same as above
Call: idle mode entry/exit, CPU frequency change
The bottom 16 bits is the CPU that the mode change applies to. For
idle events, this will always be the same as the CPU in the event header.
For frequency changes, they may be different (e.g. CPU 0 changes CPU 1's
frequency).
If the POWER_IDLE bit is on, this an idle event, if off the event is a
frequency change.
On the idle exit event, the IDLE_REACHED bit indicates that the CPU
achieved the requested sleep mode.
For frequency entry events, the VFS_OVERDRIVE bit indicates that the
change was being requested by the reception of an overdrive
sigevent. The VFS_DYNAMIC bit indicates that the DVFS algorithm is
requesting a change due to CPU loading. If neither is on, it's a change
due to powerman's list of allowed modes no longer including the
frequency that we were previously running at.
The second word of the event is the mode of the power event. For idle
events, this is the number given by the "sleep=?" characteristic in the
powerman configuration file. For frequency events, this is the
value given by the "throughput=?" characteristic (usually the CPU
frequency).
Note that for frequency events, the second word for the entry
event and exit event may be different. E.g. powerman might request
CPU 0 to be run at 300MHz, but CPU 0 & CPU 1 frequencies are tied
together and CPU 1 wants to run at 800MHz. In that case the CPU
specific code may decide to run CPU 0 at 800MHz instead of the
requested 300 and will report the fact in the exit event. Treat the
frequency entry as the requested mode and the exit as the actual
mode.
Due to interrupt preemptions, you can not be guaranteed that for each
entry event there will be a matching exit event and vis versa. E.g.
there might be multiple idle entries before an idle exit or vis versa.
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_IPI
Fast: ipicmd(32), interrupted ip(32)
Wide: same as above
Call: when an inter-processor-interrupt is received
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_PAGEWAIT
Fast: pid(32), tid(32), ip(32), vaddr(32)
Wide: pid(32), tid(32), ip(32), vaddr(32), fault type(32), mmap_flags(32),
object_offset(64), object_name(string)
Call: during page fault handling
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_SYS_TIMER
Fast: pid(32), tid(32), timer_id(32), flags(32)
Wide: same as above
Call: on timer expiry
Note - the timer_id will be -1 for timer_timeout expiry
Class: _NTO_TRACE_SYSTEM
Event: _NTO_TRACE_DEFRAG_END
Fast: rc(32), freemem(32), maxblock(32)
Wide: rc(32), freemem(32), maxblock(32)
Call: on completion of the defragmentation process (whether successful or not)
Index
__KER_* events 26 _NTO_TRACE_USER 33
__KER_MSG_SENDV 90, 91 _NTO_TRACE_USERFIRST 33
__Ring0() 27 _NTO_TRACE_USERLAST 33
_NTO_TCTL_IO 56 _NTO_TRACE_VTH* events 34
_NTO_TRACE_ALLOCBUFFER 46 _NTO_TRACE_VTHREAD 34
_NTO_TRACE_COMM 24 _PULSE_CODE_COIDDEATH 24
_NTO_TRACE_COMM_* events 24 _PULSE_CODE_DISCONNECT 24
_NTO_TRACE_CONTROL 25 _PULSE_CODE_NET_UNBLOCK 24
_NTO_TRACE_CONTROL* events 25 _PULSE_CODE_UNBLOCK 24
_NTO_TRACE_CONTROLTIME 68 .kev extension 45
_NTO_TRACE_DEALLOCBUFFER 46
_NTO_TRACE_EMPTY (not currently used) 24
_NTO_TRACE_FIPID 59
A
_NTO_TRACE_FITID 59 adaptive partitioning 30, 32
_NTO_TRACE_FLUSHBUFFER 47 event data for 32
_NTO_TRACE_FMPID 59 Address (IDE event label) 30
_NTO_TRACE_FMTID 59 ADDRESS (traceprinter event label) 30
_NTO_TRACE_GETCPU() 58 APS Bankruptcy (IDE event label) 30
_NTO_TRACE_GETEVENT_C() 58 APS Budgets (IDE event label) 30
_NTO_TRACE_GETEVENT() 58 APS Name (IDE event label) 30
_NTO_TRACE_INSERTCUSEREVENT 33, 49 APS_BANKRUPTCY (traceprinter event label) 30
_NTO_TRACE_INSERTEVENT 49 APS_NAME (traceprinter event label) 30
_NTO_TRACE_INSERTSUSEREVENT 33, 49 APS_NEW_BUDGET (traceprinter event label) 30
_NTO_TRACE_INSERTUSRSTREVENT 33, 49
_NTO_TRACE_INT 26
_NTO_TRACE_INT_HANDLER_ENTER 26 B
_NTO_TRACE_INT_HANDLER_EXIT 26
_NTO_TRACE_INT* events 26 bankruptcy (adaptive partitions) 30
_NTO_TRACE_INTENTER 26 Buffer (IDE event label) 25
_NTO_TRACE_INTEXIT 26 BUFFER (traceprinter event label) 25
_NTO_TRACE_INTFIRST 26 buffers, kernel 14, 25, 37, 43, 46, 47, 67
_NTO_TRACE_INTLAST 26 circular linked list 37
_NTO_TRACE_KERCALL 26 events concerning 25
_NTO_TRACE_KERCALLENTER 26, 90 flushing 47
_NTO_TRACE_KERCALLEXIT 26, 91 managing 43, 46
_NTO_TRACE_KERCALLINT 26 specifications 37
_NTO_TRACE_PROC* events 30
_NTO_TRACE_PROCESS 30 C
_NTO_TRACE_QUERYEVENTS 47
_NTO_TRACE_SETALLCLASSESFAST 48 ChannelConnectAttr() 27
_NTO_TRACE_SETALLCLASSESWIDE 48 ChannelCreate() 27
_NTO_TRACE_SETCLASSFAST 48 ChannelDestroy() 27
_NTO_TRACE_SETCLASSWIDE 48 circular linked list 37
_NTO_TRACE_SETEVENT_C() 58 classes 24, 25, 26, 30, 31, 33, 34, 48, 58
_NTO_TRACE_SETEVENT() 58 _NTO_TRACE_EMPTY (not currently used) 24
_NTO_TRACE_SETEVENTFAST 48 Communication 24
_NTO_TRACE_SETEVENTWIDE 48 Control 25
_NTO_TRACE_SETLINEARMODE 47 Interrupt 26
_NTO_TRACE_SETRINGMODE 47 Kernel-call 26
_NTO_TRACE_START 44, 47, 73 Process 30
_NTO_TRACE_STARTNOSTATE 47, 73 pseudo 26
_NTO_TRACE_STOP 43, 44, 47 _NTO_TRACE_INT 26
_NTO_TRACE_SYS_* events 30 _NTO_TRACE_KERCALL 26
_NTO_TRACE_SYSTEM 30 setting fast or wide mode for 48
_NTO_TRACE_TH* events 31 System 30
_NTO_TRACE_THREAD 31 Thread 31
Integrated Development Environment (IDE) (continued) Integrated Development Environment (IDE) (continued)
event labels (continued) event labels (continued)
APS Bankruptcy 30 VJoin 34
APS Budgets 30 VMutex 34
APS Name 30 VNanosleep 34
Buffer 25 VNetReply 34
Compaction 30 VNetSend 34
Condvar 31 VReady 34
Create Process 30 VReceive 34
Create Process Name 30 VReply 34
Create Thread 31 VRunning 34
Create VThread 34 VSemaphore 34
Dead 31 VSend 34
Death Pulse 24 VSigSuspend 34
Destroy Process 30 VSigWaitInfo 34
Destroy Thread 31 VStack 34
Destroy VThread 34 VStopped 34
Disconnect Pulse 24 VWaitCtx 34
Enter 27 VWaitPage 34
Entry 26 VWaitThread 34
Error 24 WaitCtx 31
Exit 26, 27 WaitPage 31
Function Enter 30 WaitThread 31
Function Exit 30 recognizes the .kev extension 45
Handler Entry 26 interlacing 67
Handler Exit 26 Interrupt (IDE event label) 31
Int 27 InterruptAttach() 27
Interrupt 31 InterruptDetach() 27
Join 31 InterruptMask() 27
MMap 30 interrupts, events concerning 26
MMap Name 30 InterruptUnmask() 27
MMUnmap 30 InterruptWait() 27
Mutex 31
NanoSleep 31
NetReply 31
J
NetSend 31 Join (IDE event label) 31
Path Manager 30
QNet Unblock Pulse 24
Ready 31 K
Receive 31
Receive Message 24 KER_CALL (traceprinter event label) 27
Receive Pulse 24 KER_EXIT (traceprinter event label) 27
Reply 24, 31 kernel 56
Running 31 calls 56
Semaphore 31 ThreadCtl(), ThreadCtl_r() 56
Send 31 kernel buffers 14, 25, 37, 67
Send Message 24 circular linked list 37
Send Pulse 24 events concerning 25
Sigevent Pulse 24 specifications 37
Signal 24 kernel calls 26, 90
SigSuspend 31 events concerning 26
SigWaitInfo 31 trace event data on failure 90
Stack 31
Stopped 31 L
System Log 30
Thread Name 30 library 66
Time 25 linear mode 43
Unblock Pulse 24 log 45
User Event 33
VCondvar 34
VDead 34
M
VInterrupt 34 MAPNAME (traceprinter event label) 30