4.3. Summary of PFT packets

A PTM assembles PFT trace, including PFT atoms, into packets. It then outputs these packets as a stream of trace data. This section summarizes the different PFT packets and their meanings. PFT packet formats describes each packet format in detail.

The PFT architecture defines the following packets:

A-sync

An A-sync (address synchronization) packet identifies a packet boundary. The first byte of data after the end of an A-sync packet is the header of a new packet.

For more information see A-sync, alignment synchronization packet.

I-sync

An I-sync (instruction synchronization) packet specifies the processor state for the next instruction to be executed. It does not indicate that any instructions have been executed.

A debugger uses an I-sync packet to obtain instruction address synchronization and processor state information for the instruction at the specified address. It cannot start tracing until it has decoded an I-sync packet.

For more information see I-sync, instruction synchronization packet.

Atom

Unless you have enabled cycle-accurate tracing, each atom packet is a single byte and is often called an atom header. In this case, the atom header contains one or more E or N atoms.

When cycle-accurate tracing is enabled, each atom packet contains a single E or N atom, and the cycle count value corresponding to that atom.

For each atom, a debugger must decode instructions from the current instruction until it reaches a waypoint instruction. It knows that the processor has executed each of these instructions. When the debugger decodes the waypoint instruction it updates:

  • the next instruction address to be the target address of the waypoint instruction

  • the processor instruction set state to the state for the instruction at that address.

The debugger obtains the required information from one or more of:

  • the program image

  • the return stack, if enabled

  • the status of the atom, that is, whether it is an E or an N atom.

For more information see Atom packet.

Branch without exception

A branch address packet without an exception implies a single E atom and contains the branch target address.

The debugger processes the atom as described for the atom packet. It then uses the branch target address from the branch address packet to update the next instruction address and the processor instruction set state.

For more information see Branch address packet.

Branch with exception

In a branch address packet with an exception, the address in the packet is the exception vector address. The packet does not indicate any execution of instructions.

The debugger must update:

  • the next instruction address to be the exception vector address

  • the processor instruction set state to the state for the instruction at that address.

For more information see Branch address packet.

Waypoint update

A waypoint update packet contains a waypoint update address, that indicates an instruction that the PTM must upgrade to a waypoint instruction.

When a debugger decodes a waypoint update packet it must decode instructions from the current instruction until it reaches an instruction address that is greater than the waypoint update address. It knows that the processor has executed all instructions up to and including any instruction at the waypoint update address. With correct PTM operation the executed instructions cannot include any waypoint instructions.

The PTM generates waypoint update packets to indicate:

  • Where execution had reached before an exception.

  • That more than 4096 bytes of instructions have been executed since the last waypoint. This use of the waypoint update packet can help a debugger manage memory, and detect errors.

For more information see Waypoint update packet.

Context ID

A Context ID packet contains a new context ID. However, the trace stream does not indicate precisely the point where the Context ID Register value changed.

When the debugger decodes a Context ID packet it must update the current Context ID. It knows that every instruction decoded after this packet was executed with this new Context ID.

For more information see Context ID packet.

Trigger

A trigger packet indicates when a trigger occurred. It is inserted precisely in the trace stream.

A debugger is not required to do anything when it decodes a trigger packet, but it might indicate where the trigger occurred.

A trigger packet is always a single byte. Therefore, it is also called a trigger header.

For more information see Trigger packet.

Ignore

An ignore packet has no effect.

A debugger does not have to do anything when it decodes an ignore packet, but it might indicate that it received the packet.

An ignore packet is always a single byte. Therefore, it is also called an ignore header.

For more information see Ignore packet.

Exception return

A PTM for an ARMv7-M processor generates an exception return packet to indicate the return from an exception handler. The packet indicates that the most recent waypoint instruction was the exception return instruction.

An exception return packet is always a single byte. Therefore, it is also called an exception return header.

For more information see Exception return packet.

Note

For PFTv1.0. a PTM for an ARMv7-A or ARMv7-R processor never generates exception return packets.

Timestamp

A timestamp packet contains the absolute value of the timestamp.

To trace program execution, a debugger does not have to do anything when it decodes a timestamp packet. However, normally a debugger outputs the new timestamp value.

For more information see Timestamp packet.

A timestamp packet is sometimes called a T-sync packet. See Timestamp synchronization.

VMID packet

From PFTv1.1, the VMID packet indicates the Virtual Machine ID of the processor.

For more information see VMID packets.

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