Dynamic instrumentation of related programming functions
OwnerRobert Hundt, David J. Babcock +3inventors
InventorsRobert Hundt, David J. Babcock, Eric Gouriou, Sujoy Saraswati, Curt Wohlgemuth
Life of this patent
Estimating the term…
Loading patent…
OwnerRobert Hundt, David J. Babcock +3inventors
InventorsRobert Hundt, David J. Babcock, Eric Gouriou, Sujoy Saraswati, Curt Wohlgemuth
Estimating the term…
A pair of functions setjmp( ) and longjmp( ) shares the data related to the program context. When instrumentation starts, the instrumentation tool creates the instrumented code, resulting in two sets of program code, e.g., the original code and the instrumented code. Functions setjmp( ) and longjmp( ) in the instrumented code may be referred to as functions setjmp′( ) and longjmp′( ), respectively. In one embodiment, when function setjmp′( ) is reached, but before being executed, the setjmp′-continued location is identified, and based on this setjmp′-continued location, the corresponding setjmp-continued location is also identified and saved for later use. When un-instrumentation occurs, the instrumented code is discarded, execution reverts to the original code, and function longjmp( ) is executed, which, based on the saved information, causes execution to continue at the setjmp-continued location. In an alternative embodiment, a breakpoint is set at the setjmp-continued location inside the setjmp block of instructions, and execution reaches this setjmp-continued location regardless of whether function longjmp( ) or function longjmp′( ) is executed. If instrumentation occurs without un-instrumentation, then the breakpoint still exists at this setjmp-continued location. Consequently, when function longjmp′( ) is executed, the setjmp-continued location is reached, the breakpoint is encountered, and execution is directed by the controlling instrumentation tool to continue with the setjmp′ block of instructions. However, if un-instrumentation occurs, then the un-instrumentation process clears the breakpoint. When function longjmp( ) is executed, execution reaches this setjmp-continued location without encountering the breakpoint, and thus continues with the setjmp block of instructions. In another alternative embodiment, the function that includes a call to function setjmp is not instrumented. Consequently, there is only one continued location for function setjmp( ), which is in the original code. Regardless of whether function longjmp( ) or function longjmp′( ) is executed, execution reaches this setjmp-continued location and executes the corresponding setjmp block of instructions.
A method for running a program in conjunction with instrumentation, comprising the steps of:
A method for running a program in conjunction with instrumentation, comprising the steps of:
A method for running a program in conjunction with instrumentation, comprising the steps of:
A computer-readable medium embodying instructions for a computer to perform a method for running a program in conjunction with instrumentation, the method comprising the steps of:
A computer-readable medium embodying instructions for a computer to perform a method for running a program in conjunction with instrumentation, the method comprising the steps of:
A computer-readable medium embodying instructions for a computer to perform a method for running a program in conjunction with instrumentation, the method comprising the steps of:
Dependencies are inferred from the claim text.