Tools and techniques for instrumenting interfaces of units of a software program
First Claim
1. A method of instrumenting one or more units of an application program, wherein a unit comprises one or more interfaces through which communications to and from the unit pass, and wherein a client unit requests creation of a server unit, the method comprising, with an instrumentation tool that includes a processor and memory:
- intercepting a call from a client unit to a unit creation function to create a server unit;
routing the call to the unit creation function, wherein the unit creation function creates the server unit and returns a reference to an interface of the server unit;
detecting the reference to the interface returned from the unit creation function;
creating an interface wrapper for the interface, the interface wrapper comprising a reference to instrumentation, the reference to the interface, and a reference to a type description of the interface; and
returning to the client unit a reference to the interface wrapper in place of the reference to the interface, wherein the client unit treats the reference to the interface wrapper as the reference to the interface.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of instrumenting one or more units of an application program is disclosed. Each unit can have one or more interfaces through which communications pass through the unit. Client units can request creation of a server unit. When they do so, the call is intercepted and sent to a unit creation function, which creates the server unit and returns a reference to an interface of the server unit. When a reference to an interface of the server unit is detected, an interface wrapper is created for the interface, the interface wrapper comprising a reference to instrumentation, the reference to the interface, and a reference to a type description of the interface. The client receives a reference to the interface wrapper in place of a reference to the interface, and thereafter is able to treat the reference to the interface wrapper as if it were a reference to the interface.
112 Citations
20 Claims
-
1. A method of instrumenting one or more units of an application program, wherein a unit comprises one or more interfaces through which communications to and from the unit pass, and wherein a client unit requests creation of a server unit, the method comprising, with an instrumentation tool that includes a processor and memory:
-
intercepting a call from a client unit to a unit creation function to create a server unit; routing the call to the unit creation function, wherein the unit creation function creates the server unit and returns a reference to an interface of the server unit; detecting the reference to the interface returned from the unit creation function; creating an interface wrapper for the interface, the interface wrapper comprising a reference to instrumentation, the reference to the interface, and a reference to a type description of the interface; and returning to the client unit a reference to the interface wrapper in place of the reference to the interface, wherein the client unit treats the reference to the interface wrapper as the reference to the interface. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. An application program unit instrumentation creator, comprising a processor, memory and storage storing computer-executable instructions for:
-
means to intercept a call from a client unit to a unit creation function; means to route the call to the unit creation function; means for the unit creation function to create a server unit and return a reference to an interface of the server unit; means to intercept the reference to the interface of the server unit; means to create an interface wrapper which comprises a reference to instrumentation, and the reference to the interface; and means to return to the client unit the interface wrapper in place of the interface reference.
-
-
17. A method of instrumenting one or more units of an application program, wherein a unit comprises one or more interfaces, through which communications to and from the unit pass, and wherein a client unit requests creation of a server unit, wherein at least one interface comprises one or more functions, wherein a call stack holds one or more parameters of a call to a function from a client unit, wherein the call stack holds a return address for the client unit, and wherein a stack pointer points to the top of the stack, the method comprising, with an instrumentation tool that includes a processor and memory:
-
receiving from the client unit an invocation of an instrumentation function that is based upon a reference to an interface wrapper that the client unit received, wherein the client unit treats the invocation as a call to a function of the interface, wherein the client unit pushes the one or more parameters for the call to the function on the call stack, and wherein the client unit pushes a return address for the client unit on the call stack; determining if the interface is documented based upon the interface wrapper; if the interface is undocumented, storing the value of the stack pointer; storing the return address for the client unit; replacing the return address for the client unit on the call stack with a return address for an instrumentation function; transferring execution to the function of the interface using the reference to the interface in the interface wrapper, wherein the function performs an operation; after the function finishes, popping the return address for the instrumentation function from the call stack; popping the one or more parameters from the call stack; transferring execution to the instrumentation function; calculating the size of the one or more parameters based upon the stored value of the stack pointer and the current value of the stack pointer; storing the calculated size in the type description of the interface wrapper; transferring execution to the client unit. - View Dependent Claims (18, 19, 20)
-
Specification