Patent ID: 7140008

Claim:
A method of instrumenting a program to provide sampled temporal profiling bursts of a program execution trace, the method comprising: providing a duplicate version of at least some procedures in the program with instrumentation for capturing a temporal sequence of data references by the program; inserting check code at locations of at least some procedure entries and loop back-edges of the program; alternately tracking a number of iterations of the check code executed in a checking phase and a profiling phase up to respective checking and profiling count parameters, wherein the profiling count parameter is more than one and the duplicate version of at least some procedures with instrumentation are executed during the profiling phase and a non-instrumented version of the program's procedures are executed during the checking phase; upon executing the check code when in the checking phase, causing execution to proceed in the non-instrumented version of the program's procedures; upon executing the check code when in the profiling phase, causing execution to proceed in the duplicate instrumented version of the at least some procedures; and switching between checking and profiling phases upon the tracked number of iterations of the check code reaching the respective count parameter of the respective phase.