Tools and techniques for instrumenting interfaces of units of a software program
1 Assignment
0 Petitions
Accused Products
Abstract
An automatic distributed partitioning system (ADPS) determines which unit exposes an interface in a framework in which units lack reliable identities. The ADPS detects a reference to an interface. For the interface, the ADPS assures that the unit that exposes the interface is identified. Using unit identities, the ADPS performs operations such as profiling of an application or classifying units of an application. An interface wrapper for the interface stores the identity of the unit that exposes the interface, as well as information about the interface and a reference to instrumentation. When a client unit calls a member function of an interface, the interface wrapper intercepts the call and invokes the instrumentation. The instrumentation performs an operation such as profiling the application or classifying a unit. The ADPS detects when an interface is undocumented, and handles undocumented interfaces without invoking the full instrumentation capabilities of the ADPS. When the ADPS detects an undocumented interface, the ADPS notes a pair-wise location constraint for the units that communicate across the undocumented interface.
90 Citations
86 Claims
-
1-66. -66. (canceled)
-
67. 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:
-
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 (68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81)
-
-
82. An application program unit instrumentation creator, comprising 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.
-
-
83. 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 further comprising:
-
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 (84, 85, 86)
-
Specification