A system comprising a processor adapted to execute software code
comprising branch instructions and a trace logic coupled to the processor
and adapted to generate a branch packet comprising branch bits. At least
some of the branch bits are associated with branch instructions executed
by the processor. The trace logic flushes invalid branch bits in the
branch packet with a common bit, the common bit an inverse of a valid
branch bit. The trace logic outputs the branch packet with an indicator
comprising the valid branch bit.