IP Library Granted Patent US 6,918,110
Granted Patent B2
US 6,918,110 · App. 09/833,248 · Granted Jul 12, 2005

Dynamic instrumentation of an executable program by means of causing a breakpoint at the entry point of a function and providing instrumentation code

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 6,918,110
App. No.
09/833,248
Granted
Jul 12, 2005
Kind
B2
Abstract

Method and apparatus for dynamic instrumentation of an executable application program. The application program includes a plurality of functions, each function having an entry point and an endpoint. When the application is executed, a shared memory segment is created for an instrumentation program and the application program. Upon initial invocation of the original functions in the application program, corresponding substitute functions are created in the shared memory segment, the substitute versions including instrumentation code. Thereafter, the substitute functions are executed in lieu of the original functions in the application program.

Claims (35)

1. A computer-implemented method for dynamic instrumentation of an executable application program using an instrumentation program, the application program including a plurality of original functions, each original function having an entry point and an endpoint, comprising:

patching the function entry points with breakpoint instructions;

creating a shared memory segment for the instrumentation program and the application program;

upon initial invocation of the original functions in the application program and in response to encountering the breakpoint instructions, creating in the shared memory segment corresponding substitute functions including instrumentation code; and

executing the substitute functions in lieu of the original functions in the application program.

2. The method of claim 1 , further comprising replacing the break instruction at the entry points of the functions in the application program with branch instructions that target the substitute functions.

3. The method of claim 2 , wherein the executable application program includes one or more branch instructions having target addresses that reference entry points of one or more of the original functions, further comprising:

after creating a substitute function corresponding to an original function, for a branch instruction that references the original function replacing the target addresses to reference the substitute function.

4. The method of claim 2 , wherein the executable application program is stored in memory and includes one or more branch instructions having associated target addresses that reference entry paints of one or more of the original functions in the memory, further comprising:

after creating a substitute function corresponding to an original function, for each branch instruction that references the original function in memory, replacing, in the application program stored in the memory, the associated target address with an address that references the substitute function.

5. The method of claim 1 , wherein the executable application program includes one or more branch instructions having target addresses that reference entry points of one or more of the original functions, further comprising:

after creating a substitute function corresponding to an original function, for a branch instruction that references the original function replacing the target addresses to reference the substitute function.

6. The method of claim 1 , further comprising:

copying a segment of the executable application program to selected area of memory by the instrumentation program;

replacing the segment of the application program with code that allocates the shared memory by the instrumentation program;

executing the code in the application program that allocates the shared memory segment; and

restoring the segment of the executable application from the selected area of memory to the application program by the instrumentation program after the shared memory is allocated.

7. The method of claim 6 , further comprising replacing the break instruction at the entry points of the functions in the application program with branch instructions that target the substitute functions.

8. The method of claim 7 , wherein the executable application program includes one or more branch instructions having target addresses that reference entry points of one or more of the original functions, further comprising:

after creating a substitute function corresponding to an original function, for a branch instruction that references the original function replacing the target addresses to reference the substitute function.

9. The method of claim 6 , wherein the executable application program includes one or more branch instructions having target addresses that reference entry points of one or more of the original functions, further comprising:

after creating a substitute function corresponding to an original function, for a branch instruction that references the original function replacing the target addresses to reference the substitute function.

10. The method of claim 6 , wherein the executable application program includes a plurality of threads and further comprising:

before the step of copying the segment of the executable application program suspending all threads of the executable application program, and selecting one of the suspended threads; and

after replacing the segment of the executable application program with the code that allocates the shared memory, resuming execution of the one of the suspended threads at the code that allocates the shared memory.

11. The method of claim 10 , further comprising replacing the break instruction at the entry points of the functions in the application program with branch instructions that target the substitute functions.

12. The method of claim 11 , wherein the executable application program includes one or more branch instructions having target addresses that reference entry points of one or more of the original functions, further comprising:

after creating a substitute function corresponding to an original function, for a branch instruction that references the original function replacing the target addresses to reference the substitute function.

13. The method of claim 1 , wherein the executable application program is stored in memory and includes one or more branch instructions having associated target addresses that reference entry points of one or more of the original functions in the memory, further comprising:

after creating a substitute function corresponding to an original function, for each branch instruction that references the original function in memory, replacing, in the application program stored in the memory, the associated target address with an address that references the substitute function.

14. An apparatus for dynamic instrumentation of an executable application program by an instrumentation program, the application program including a plurality of original functions, each original function having an entry point and an endpoint, comprising:

means for patching the function entry points with breakpoint instructions;

means for creating a shared memory segment for the instrumentation program and the application program;

means for creating in the shared memory segment corresponding substitute functions including instrumentation code upon initial invocation of the original functions in the application program and in response to encountering the breakpoint instructions; and

means for executing the substitute functions in lieu of the original functions in the application program.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 6, 2021
From: OT PATENT ESCROW, LLC
To: VALTRUS INNOVATIONS LIMITED
Reel/Frame 056157/0492 →
PATENT ASSIGNMENT, SECURITY INTEREST, AND LIEN AGREEMENT Recorded Jan 26, 2021
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP; HEWLETT PACKARD ENTERPRISE COMPANY
To: OT PATENT ESCROW, LLC
Reel/Frame 055269/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2015
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 037079/0001 →