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:
-
In the Project Explorer, click the Open Settings... button.
-
Select one or several nodes in the Configuration pane.
-
Select the Runtime Analysis node and the Runtime Tracing node.
-
Select Runtime Tracing Control.
-
Set the Buffer trace items setting to Yes or No to activate or disable the mode.
-
Set the size of the buffer in the Items buffer size box.
-
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.