A method and an apparatus for re-creating a trace of instructions from an
emulated instruction set when running on hardware optimized for a
different instruction set, such as IA-32 instructions running on an IA-64
machine, are disclosed. An execution trace buffer is created that
maintains desired information about instructions as they are executed and
retired. The invention may be configured such that certain desired
information helpful to debugging the system may be written to the buffer
as the instructions are retired. This information may include the
addresses of sequential or branch instructions, or other relevant
information that can be gathered continuously and non-intrusively as
instructions are executed. The information may be read from the buffer and
output in a machine-visible form at the user's convenience.