Patent ID: 7530055

Claim:
A method for tracing an instrumented program on a processor having an x86 architecture, comprising: triggering a probe in the instrumented program; obtaining an original instruction associated with the probe, wherein obtaining the original instruction comprises searching a look-up table using a program counter value, wherein the look-up table comprises the original instruction associated with the probe and an address associated with the original instruction, and wherein the program counter value corresponds to a current address of a first thread executing in the instrumented program; allocating a second scratch space for a second thread; loading the original instruction into the second scratch space, wherein the scratch space is allocated on a per-thread basis, and wherein a first scratch space for the first thread executing in the instrumented program was previously allocated; loading a jump instruction for the x86 architecture into the second scratch space wherein the jump instruction includes a next program counter value; executing the original instruction in the second scratch space using the second thread to collect data; and executing the jump instruction in the second scratch space using the second thread.