2.1.1. Tracing branches

When the processor executes a direct branch instruction, if a trace decompressor knows whether the instruction passed its condition code check it can determine the destination address of the instruction, because it knows the instruction address and opcode. Therefore, by default, a PTM traces a direct branch by generating an atom:

The PTM can assemble a number of atoms, and output them as a single byte of trace in an atom header.

For an indirect branch instruction, when the return stack is disabled or not implemented:


  • A return stack is an optional PFT feature that reduces the number of branch packets generated by the PTM. and therefore significantly reduces the amount of trace output. For more information see Use of a return stack.

  • A trace decompressor can configure the PTM to use branch address packets to trace direct branches, by configuring it for branch broadcasting. For example, this might be useful for tracing a BLX <immed> branch that changes to Thumb state. Generating a branch address packet means that the change to Thumb state is indicated explicitly in the trace stream.

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