TRC Module
Application Program Interface
2-467
2.28
TRC Module
The TRC module is the trace manager.
Functions
❏
TRC_disable. Disable trace class(es)
❏
TRC_enable. Enable trace type(s)
❏
TRC_query. Query trace class(es)
Description
The TRC module manages a set of trace control bits which control the
real-time capture of program information through event logs and statistics
accumulators. For greater efficiency, the target does not store log or
statistics information unless tracing is enabled.
Table 2-11 lists events and statistics that can be traced. The constants
defined in trc.hand trc.h55 are shown in the left column.
Table 2-11.
Events and Statistics Traced by TRC
Constant
Tracing Enabled/Disabled
Default
TRC_LOGCLK
Log timer interrupts
off
TRC_LOGPRD
Log periodic ticks and start of periodic functions
off
TRC_LOGSWI
Log events when a SWI is posted and completes
off
TRC_LOGTSK
Log events when a task is made ready, starts, becomes blocked, resumes
off
TRC_STSHWI
Gather statistics on monitored values within
HWI
s
off
TRC_STSPIP
Count number of frames read from or written to data pipe
off
TRC_STSPRD
Gather statistics on number of ticks elapsed during execution
off
TRC_STSSWI
Gather statistics on length of
SWI
execution
off
TRC_STSTSK
Gather statistics on length of
TSK
execution. Statistics are gathered from
the time TSK is made ready to run until the application calls TSK_deltatime.
off
TRC_USER0
and
TRC_USER1
Your program can use these bits to enable or disable sets of explicit instru-
mentation actions. You can use
TRC_query
to check the settings of these
bits and either perform or omit instrumentation calls based on the result.
off
TRC_GBLHOST
This bit must be set in order for any implicit instrumentation to be performed.
Simultaneously starts or stops gathering of all enabled types of tracing. This
can be important if you are trying to correlate events of different types. This
off
TRC_GBLTARG
This bit must also be set for any implicit instrumentation to be performed.
This bit can only be set by the target program and is enabled by default.
on
TRC_STSSWI
Gather statistics on length of
SWI
execution
off