User`s guide

Instrumentation APIs
Instrumentation 3-17
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.
Table 3-2. TRC Constants:
Note: Updating Task Statistics
If TSK_deltatime is not called by a task, its statistics will never be updated
in the Statistics View, even if TSK accumulators are enabled in the RTA
Control Panel.
TSK statistics are handled differently than other statistics because TSK
functions typically run an infinite loop that blocks while waiting for other
threads. In contrast, HWI and SWI functions run to completion without
blocking. Because of this difference, DSP/BIOS allows programs to identify
the "beginning" of a TSK function's processing loop by calling TSK_settime
and the "end" of the loop by calling TSK_deltatime.
Constant Tracing Enabled/Disabled Default
TRC_LOGCLK
Logs low-resolution clock interrupts off
TRC_LOGPRD
Logs system ticks and start of periodic functions off
TRC_LOGSWI
Logs posting, start, and completion of software interrupt functions off
TRC_LOGTSK
Logs events when a task is made ready, starts, becomes blocked, resumes
execution, and terminates. This constant also logs semaphore posts.
off
TRC_STSHWI Gathers statistics on monitored register values within HWIs
off
TRC_STSPIP
Counts the number of frames read from or written to data pipe off
TRC_STSPRD
Gathers statistics on the number of ticks elapsed during execution of
periodic functions
off
TRC_STSSWI
Gathers statistics on number of instruction cycles or time elapsed from post
to completion of software interrupt
off
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.
off
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.
off
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.
off
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