The Runtime Tracing feature allows the user to add special directives to the source code under test, known as instrumentation pragma directives. When the source code is instrumented, the Instrumentor replaces instrumentation pragma directives with dedicated code.
#pragma attol <pragma name> <directive>
int f ( int a )
{
#pragma attol att_insert if ( a == 0 ) _ATT_DUMP_STACK
return a;
}
This code will be replaced, after instrumentation, with the following line:
/*#pragma attol att_insert*/ if ( a == 0 ) _ATT_DUMP_STACK
Note Pragma directives are implemented only if the routine in which it is used is instrumented.
#pragma attol insert <directive>
replaced by the instrumentation to be:
/*#pragma attol insert*/ <directive>
if any of Code Coverage, Runtime Tracing, Memory Profiling or Performance Profiling is/are selected.
#pragma attol atc_insert <directive>
replaced by the instrumentation to be:
/*#pragma attol atc_insert*/ <directive>
if Code Coverage is selected.
#pragma attol att_insert <directive>
replaced by the instrumentation to be:
/*#pragma attol att_insert*/ <directive>
if Runtime Tracing is selected.
#pragma attol atp_insert <directive>
replaced by the instrumentation to be:
/*#pragma attol atp_insert*/ <directive>
if Memory Profiling is selected.
#pragma attol atq_insert <directive>
replaced by the instrumentation to be:
/*#pragma attol atq_insert*/ <directive>
if Performance Profiling is selected.
The following macros are for use only with Memory Profiling and Performance Profiling.
_ATCPQ_DUMP(<reset>)
where <reset>
is 1 if internal tables reset is wanted or 0 if not. This pragma can be
automatically inserted by clicking the Insert Dump button
in the Text Editor toolbar.
_ATP_CHECK(@REFLINE)
This macro indicates a manual dump point in the source code for checking for ADWL or FMWL errors when using Memory Profiling. The corresponding setting must be selected
The @REFLINE parameter is mandatory.
_ATP_TRACK(<pointer>)
This macro adds <pointer> to a list of selected memory blocks to check for ABWL or FMWL errors. a manual dump point in the source code for checking for ADWL or FMWL errors when using Memory Profiling.
When using this mode, the Target Deployment Package only sends messages related to instance creation and destruction, or user notes. All other events are ignored. See Partial message dump for more information about this feature.
_ATT_START_DUMP
_ATT_STOP_DUMP
These directives activate and deactivate the partial message dump mode.
_ATT_TOGGLE_DUMP
This directive toggles the dump mode on and off. _ATT_TOGGLE_DUMP can be used instead of _ATT_START_DUMP and _ATT_STOP_DUMP.
_ATT_DUMP_STACK
When invoked, this directive dumps the contents of the call stack at that moment.
_ATT_FLUSH_ITEMS
When in Target Deployment Package buffer mode, this directive flushes the buffer. All buffered trace information is dumped. Flushing the buffer be useful before entering a time-critical phase of the trace.
_ATT_USER_NOTE(<text>)
This directive associates a text note to the function or
method instance. <text>
is a user-specified alphanumeric string containing the note text of type
char*. The length of <text> must be within the
maximum note length specified in the Runtime Tracing Settings dialog box.
This pragma can be automatically inserted by clicking the Add Note button in the Text Editor toolbar.