background image
<< Performance Profiling Overhead | Target Deployment Ports >>
<< Performance Profiling Overhead | Target Deployment Ports >>

Generating SCI Dumps

Product Overview
Generating SCI Dumps
By default, the system call atexit() or on_exit() invokes the Target Deployment Port
(TDP) function that dumps the trace data. You can therefore instrument either all or a
portion of the application as required.
When instrumenting embedded or specialized applications that never terminate, it is
sometimes impractical to generate a dump on the atexit() or on_exit() functions. If
you exit such applications unexpectedly, traces may not be generated.
In this case, you must either:
·
Specify one or several explicit dump points in your source code, or
·
Use an external signal to call a dump routine, or
·
Produce an snapshot when a specific function is encountered.
Explicit Dump
Code Coverage, Memory Profiling and Performance Profiling allow you to explicitly
invoke the TDP dump function by inserting a call to the _ATCPQ_DUMP(1) macro
definition (the parameter 1 is ignored).
Explicit dumps should not be placed in the main loop of the application. The best
location for an explicit dump call is in a secondary function, for example called by the
user when sending a specific event to the application.
The explicit dump method is sometimes incompatible with
watchdog
constraints. If
such incompatibilities occur, you must:
·
Deactivate any hardware or software watchdog interruptions
·
Acknowledge the watchdog during the dump process, by adding a specific call
to the Data Retrieval customization point of the TDP.
Dump on Signal
Code Coverage allows you to dump the traces at any point in the source code by
using the ATC_SIGNAL_DUMP environment variable.
When the signal specified by ATC_SIGNAL_DUMP is received, the Target
Deployment Port function dumps the trace data and resets the signal so that the same
signal can be used to perform several trace dumps.
Before starting your tests, set ATC_SIGNAL_DUMP to the number of the signal that
is to trigger the trace dump.
The signal must be redirectable signal, such as SIGUSR1 or SIGINT for example.
Instrumentor Snapshot
5