Trace item buffer

Runtime Tracing for C and C++

Buffering allows you to reduce formatting and I/O processing at time-critical steps by telling the Target Deployment Port to only output trace information when its buffer is full or at user-controlled points.

This can prove useful when using Runtime Tracing on real-time applications, as you can control buffer flush from within the source-under-trace.

To activate or de-activate trace item buffering:

  1. In the Project Explorer, click the Open Settings... button.

  2. Select one or several nodes in the Configuration pane.

  3. Select the Runtime Analysis node and the Runtime Tracing node.

  4. Select Runtime Tracing Control.

  5. Set the Buffer trace items setting to Yes or No to activate or disable the mode.

  6. Set the size of the buffer in the Items buffer size box.

  7. When you have finished, click OK to validate the changes.

A smaller buffer optimizes memory usage on the target platform, whereas a larger buffer improves performance of the real-time trace. The default value is 64.

Flushing the Trace Buffer through a User Directive

It can be useful to flush the buffer before entering a time-critical part of the application-under-trace. You can do this by adding the _ATT_FLUSH_ITEMS user directive to the source-under-trace.

Note   See Runtime Tracing pragma directives in the Reference Manual to control Target Deployment Port buffering from within the source code.