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) instrumentation pragma (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.

You can automatically add an explicit dump your C and C++ source code by clicking the Add Dump button Button Add Dump in the text editor. This inserts the _ATCPQ_DUMP instrumentation pragma into your source code.

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

The Instrumentor snapshot option enables you to specify the functions of your application that will dump the trace information on entry, return or call.

In snapshot mode, the Runtime Tracing feature starts dumping messages only if the Partial Message Dump setting is activated. Code Coverage, Memory Profiling and Performance Profiling features all dump their internal trace data.

Frequency Dump

when all functions listed in DUMPRETURNING, DUMPENTERING and DUMPCALLING are executed too often by the application, a call divider number can be used to get a result dump less frequent than the functions call frequency, after multiple dump requests.

_ATL_OBSTOOLS_DUMP_FREQ: perl variable used in envNode.pl

  • 0 is used to specified that the additional code is disabled.

  • 1 is used to specified that the dump is made on each call of the methods listed in snapshot method lists.

  • 10 is used to specified that the dump is made every 10 calls of the methods listed in snapshot method lists.

Related Topics

General Runtime Analysis Settings | Instrumentation pragmas