2.6. Trace filtering

You can use ETM events to disable and enable tracing as the trace run proceeds. Suspending and enabling tracing under certain conditions enables you to make best use of the storage capacity of the trace capture device, because capacity is not used up while tracing is suspended. For example, you might want to trace the execution of a particular function that occurs infrequently. If a particular trace run proceeds without interruption, you might observe only one or two occasions when the function executes. However, by disabling trace when that function is not executing you can ensure that the trace memory is filled only with relevant information. In this way, you can capture many more instances of the execution of the function, and the information extends over a greater period of time.

Whenever the trace is re-enabled, a full 32-bit address is output on the trace port, giving the address of the first instruction traced. If Context ID tracing is enabled, the current Context ID is also output. This provides full synchronization, so the decompressor is always able to start decompression from this point. Because of this overhead, we recommend that you do not disable the trace for only a small number of instructions. Enabling and disabling the trace over only a few instructions results in an increase in trace information passed through the trace port.

Note

If you attempt to disable tracing so briefly that the sequence required to re-enable tracing cannot be output, the ETM might continue tracing during the intended interval.

There are two principal ways to filter the trace:

You can also configure the FIFOFULL signal to optimize use of the FIFO. Figure 2.10 shows the logic used for FIFOFULL configuration.

ETMv3.0 and later provides a data suppression mechanism. When data suppression is enabled and the amount of data in the FIFO exceeds the preset FIFO level, then no more data can be traced. The ETM stops tracing data rather than stopping the processor. See Data suppression for more information.

From ETMv3.3, it is implementation defined whether data suppression is supported. For more information. See Main Control Register, ETMCR.

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