
Instrumentation APIs
Instrumentation
3-27
3.5.4.2 Control of Implicit Instrumentation
The TRC module manages a set of trace bits that control the real-time
capture of implicit instrumentation data through logs and statistics objects.
For greater efficiency, the target does not store log or statistics information
unless tracing is enabled. (You do not need to enable tracing for messages
explicitly written with LOG_printf or LOG_event and statistics added with
STS_add or STS_delta.)
DSP/BIOS defines constants for referencing specific trace bits as shown in
Figure 3-2. The trace bits allow the target application to control when to start
and stop gathering system information. This can be important when trying to
capture information about a specific event or combination of events.
By default, all TRC constants are enabled. However, TRC_query returns non-
zero if either the TRC_GBLHOST or TRC_GBLTARG constants are disabled.
This is because no tracing is done unless these bits are set.
Table 3-2.
TRC Constants:
Constant
Tracing Enabled/Disabled
Default
TRC_LOGCLK
Logs low-resolution clock interrupts
on
TRC_LOGPRD
Logs system ticks and start of periodic functions
on
TRC_LOGSWI
Logs posting, start, and completion of software interrupt functions
on
TRC_LOGTSK
Logs events when a task is made ready, starts, becomes blocked, resumes
execution, and terminates. This constant also logs semaphore posts.
on
TRC_STSHWI
Gathers statistics on monitored register values within
HWI
s
on
TRC_STSPIP
Counts the number of frames read from or written to data pipe
on
TRC_STSPRD
Gathers statistics on the number of ticks elapsed during execution of
periodic functions
on
TRC_STSSWI
Gathers statistics on number of instruction cycles or time elapsed from post
to completion of software interrupt
on
TRC_STSTSK
Gather statistics on length of
TSK
execution from when a task is made
ready to run until a call to TSK_deltatime() is made; measured in timer
interrupt units or CLK ticks.
on
TRC_USER0
and
TRC_USER1
Enables or disables sets of explicit instrumentation actions. You can use
TRC_query
to check the settings of these bits and either perform or omit
calls based on the result. DSP/BIOS does not use or set these bits.
on
TRC_GBLHOST
Simultaneously starts or stops gathering all enabled types of tracing. This bit
must be set in order for any implicit instrumentation to be performed. This
can be important if you are trying to correlate events of different types. This
bit is usually set at run time on the host with the RTA Control Panel.
on
TRC_GBLTARG
Controls implicit instrumentation. This bit must also be set in order for any implicit
instrumentation to be performed, and can only be set by the target program.
on
Содержание TMS320 Series
Страница 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Страница 16: ...xvi ...
Страница 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Страница 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Страница 202: ...5 20 ...
Страница 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Страница 288: ...Index 10 Index ...