A method and a computer with circuitry configured for performance of the
method are disclosed. During a profiled interval of an execution of a
program on a computer, profile information is recorded describing the
execution, without the program having been compiled for profiled
execution. The program is coded in an instruction set in which an
interpretation of an instruction depends on a processor mode not
expressed in the binary representation of the instruction. The recorded
profile information describes at least all events occurring during the
profiled execution interval of the two classes: (1) a divergence of
execution from sequential execution; and (2) a processor mode change that
is not inferable from the opcode of the instruction that induces the
processor mode change taken together with a processor mode before the
mode change instruction. The profile information further identifies each
distinct physical page of instruction text executed during the execution
interval.