In one embodiment, an integrated circuit comprises a first processor
configured to output program counter (PC) trace records, wherein PC trace
records provide data indicating the PCs of instructions retired by the
first processor. The integrated circuit further comprises a second source
of trace records, and a trace unit coupled to receive the PC trace
records from the first processor and the trace records from the second
source. The trace unit comprises a trace memory into which the trace unit
is configured to store the PC trace records and trace records from the
second source. The trace unit is configured to interleave the PC trace
records and the trace records from the second source in the trace memory
according to the order of receipt of the records.