What is trace used for?

As shown in What is trace?, trace in Arm systems captures various different target operations and information. This means that trace can help:

  • Diagnose problems during runtime:
    • Instruction trace shows the core execution history and places where execution might behave unexpectedly.
    • Data trace shows what memory addresses were accessed and if the accesses completed successfully.
    • Instrumentation trace can output printf-style debugging. On a Cortex-M processor, instrumentation trace can dump useful core information.
    • Program system trace to monitor signals within the system that might show abnormal behavior.
  • Measure performance:
    • Instruction trace shows cycle count information and timestamps alongside the instruction execution history.
    • Instrumentation and system trace output profiling information like performance register values or timestamps.
  • View operation on a system-level:
    • System trace monitors signals outside the processor or core to show a wider scope of target activity.

Note: Target designers try to keep trace functionality available throughout the development life cycle of their target. However, trace capability might be phased out or restricted during the development cycle of some targets. Refer to your target manufacturer, target designer, and target documentation for the trace capability of the target design.

Previous Next