2.1. About Program Flow Tracing

When tracing processor execution, other ARM trace architectures generate trace for every instruction that the processor commits for execution. This generates trace that is easy to interpret, but it normally requires a high trace bandwidth. The Program Flow Trace (PFT) architecture assumes that any trace decompressor has a copy of the program being traced, and generally outputs only enough trace for the decompressor to reconstruct the program flow. However, its trace output also enables a decompressor to reconstruct the program flow when it does not have a copy of parts of the program, for example because the program uses self-modifying code.

The PFT architecture also provides full information about exceptions, and the instruction set state, security state, and current Context ID of the processor. It can also provide cycle count information, and timestamping.

A trace macrocell that implements the PFT architecture is called a Program Trace Macrocell (PTM).

PFT identifies certain instructions in the program, and certain events, as waypoints. A waypoint is a point where instruction execution by the processor might involve a change in the program flow. A PTM only traces these waypoints.

PFT waypoints include:

When a waypoint occurs, the PTM generates trace data that describes the waypoint. From this data, a trace decompressor can determine how many instructions have been executed since the previous waypoint, and therefore can reconstruct the execution stream. In effect, the PTM outputs an indicator at each waypoint, and the decompressor matches these indicators with the waypoints in the program code, to reconstruct the program flow.

To provide this waypoint matching, certain instructions are treated as waypoint instructions, regardless of whether:

Waypoint instructions are a subset of the waypoints that a PTM traces:

PFT only traces execution at waypoints. Tracing a waypoint implies the execution of all instructions from the target address of the previous waypoint up to the current waypoint. Nonwaypoint instructions are not traced explicitly, and a debugger can infer the execution of a block of contiguous instructions between two waypoints only when the waypoint at the end of the block is traced. The concept of a block of instructions is used throughout this document, and refers to the contiguous block of instructions between two waypoints.

The following subsections give more information about PTM tracing:

Copyright © 1999-2002, 2004-2008, 2011 ARM. All rights reserved.ARM IHI 0035B