2.1. About controlling tracing

You control tracing in two ways:


Triggering controls when the collection of the trace data occurs. Setting a trigger enables you to focus trace collection around your region of interest.


Filtering controls the type of trace information that is collected. It is important to optimize usage of the trace port bandwidth, especially when a narrow trace port is used. Filtering the trace serves two purposes:

  • It prevents overflow of the internal FIFO by minimizing the number of data transfers traced. This is especially important when the FIFO is small or the trace port is narrow.

  • It limits the amount of trace stored by the trace capture device (TCD), for example a TPA or an on-chip trace buffer. This enables more useful information to be stored around the trigger.

You can filter the instruction trace or the data trace as follows:

  • Filter the instruction trace by enabling and disabling trace generation. This is the TraceEnable function.

  • Filter the data trace by indicating the specific data accesses that must be traced. This is the ViewData function.

You use the ETM event logic to configure the ETM event resources that are used for triggering and filtering. Resources match for one or more cycles when the condition they have been programmed to check for occurs. Resources are selected to control different aspects of ETM operation, for example:

In the most simple case, where a resource is selected to enable tracing, tracing is performed whenever the resource matches.

In most cases you can define an ETM event, where you select a boolean function and two resources to define a condition.

For more information, see ETM event resources and ETM event logic.

Copyright © 1999-2002, 2004-2009, 2011 ARM Limited. All rights reserved.ARM IHI 0014Q