Patent ID: 7062684

Claim:
A method for enabling tracing of a repeat instruction, comprising: enabling a repeat instruction flag within a processor that when set directs an interrupt controller to trigger an interrupt upon completion of a repeat instruction, wherein said repeat instruction comprises at least one particular instruction to be repeated and a particular number of repetitions intended for said at least one particular instruction prior to completion of said repeat instruction; programming at least one control unit within said processor to copy said particular number of repetitions into a separate storage unit within said processor independent of a counter decremented upon each execution of said at least one particular instruction, upon detection of said repeat instruction and said repeat instruction flag set; responsive to detecting said repeat instruction in at least one line of code executing within said processor and said repeat instruction flag set, copying said particular number of repetitions to said counter and said separate storage unit within said processor; executing said at least one particular instruction of said repeat instruction within said processor, wherein said counter decrements for each execution of said at least one particular instruction; responsive to detecting a last execution of said at least one particular instruction while said repeat instruction flag is still set, initiating an interrupt within said processor; and enabling a read of a count of actual executions for said repeat instruction from a comparison of a value within said storage unit within said processor with a remaining count in said counter during said interrupt.