Interception of unit creation requests by an automatic distributed partitioning system
First Claim
1. A method for redirecting a function call of a client unit of an application program to a unit activation function, wherein an automatic distributed partitioning system redirects the function call, and wherein the unit activation function dynamically creates a unit during execution of an application program, the method comprising:
- receiving an application program, wherein the application program comprises plural units, and wherein the application program comprises at least one function call to a unit activation function from a client unit;
redirecting by an automatic distributed partitioning system the function call from the client unit to the unit activation function.
2 Assignments
0 Petitions
Accused Products
Abstract
An automatic distributed partitioning system (ADPS) intercepts function calls to unit activation functions that dynamically create application units, such as a component instantiation function. A system service library provides a unit activation function. An application program includes at least one function call to the unit activation function. The ADPS redirects the function call to instrumentation of the ADPS. In one technique, the ADPS uses inline redirection of the function call to the unit activation function.
-
Citations
23 Claims
-
1. A method for redirecting a function call of a client unit of an application program to a unit activation function, wherein an automatic distributed partitioning system redirects the function call, and wherein the unit activation function dynamically creates a unit during execution of an application program, the method comprising:
-
receiving an application program, wherein the application program comprises plural units, and wherein the application program comprises at least one function call to a unit activation function from a client unit;
redirecting by an automatic distributed partitioning system the function call from the client unit to the unit activation function. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
redirecting the function call from the client unit to the second unit activation function.
-
-
3. The method of claim 1 wherein the step of redirecting comprises:
-
identifying the function call in application source code;
replacing the function call with a call to an instrumentation unit activation function; and
when the client unit calls the unit activation function, invoking the instrumentation unit activation function.
-
-
4. The method of claim 1 wherein the step of redirecting comprises:
-
identifying the function call in application binary code;
replacing the function call with a call to an instrumentation unit activation unction; and
when the client unit calls the unit activation function invoking the instrumentation unit activation function.
-
-
5. The method of claim 1 wherein a system service library comprises the unit activation function, wherein a table comprises a reference to the unit activation function, wherein the call to the unit activation function in the application program is an indirect call through the reference of the table, and wherein the step of redirecting comprises:
-
identifying the reference to the unit activation function in the table;
replacing the reference to the unit activation function with a reference to an instrumentation unit activation function; and
when the client unit calls the unit activation function invoking the instrumentation unit activation function.
-
-
6. The method of claim 1 wherein a system service library comprises the unit activation function, and wherein the step of redirecting comprises:
-
identifying the unit activation function;
replacing the unit activation function with an instrumentation unit activation function; and
when the client unit calls the unit activation function invoking the instrumentation unit activation function.
-
-
7. The method of claim 1 wherein a system service library comprises the unit activation function, and wherein the step of redirecting comprises:
-
identifying the system service library;
replacing the system service library with a system service library comprising an instrumentation unit activation function; and
when the client unit calls the unit activation function invoking the instrumentation unit activation function.
-
-
8. The method of claim 1 wherein a system service library comprises the unit activation function, and wherein the step of redirecting comprises:
-
identifying the unit activation function;
inserting a breakpoint trap at the start of the unit activation function; and
when the client unit calls the unit activation function invoking the instrumentation unit activation function.
-
-
9. The method of claim 1 wherein the step of redirecting comprises:
-
identifying a detour function;
identifying the unit activation function, wherein the unit activation function comprises plural instructions for activating a unit of an application program;
creating a trampoline function, wherein the trampoline function comprises one or more instructions from the beginning of the unit activation function, and wherein the trampoline function further comprises a jump instruction to a location in the unit activation function that follows the one or more instructions at the beginning of the unit activation function;
replacing the one or more instructions at the beginning of the unit activation function with a jump instruction to the detour function;
when the client unit calls the unit activation function, transferring control to the detour function; and
executing the instructions of the detour function.
-
-
10. A computer-readable medium having computer-executable instructions for performing the method of claim 1.
-
11. A method for intercepting a call to a unit activation function in an automatic distributed partitioning system, wherein the unit activation functiondynamically creates a unit during execution of an application program, the method comprising:
-
identifying a detour function;
identifying a unit activation function, wherein the unit activation function comprises plural instructions for activating a unit of an application program;
creating a trampoline function, wherein the trampoline function comprises one or more instructions from the beginning of the unit activation function, and wherein the trampoline function further comprises a jump instruction to a location in the unit activation function that follows the one or more instructions at the beginning of the unit activation function;
replacing the one or more instructions at the beginning of the unit activation function with a jump instruction to the detour function;
when a client unit calls the unit activation function to request the creation of a unit to be created, transferring control to the detour function; and
executing the instructions of the detour function. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
classifying the unit to be created, resulting in a classifier;
determining a location in a distributed computing environment for activating the unit to be created based upon the classifier; and
if the location is local, calling the trampoline function, whereby the instructions of the trampoline function execute and control passes to the unit activation function.
-
-
14. The method of claim 13 further comprising:
if the location is remote, activating the unit on a remote computer in the distributed computing environment.
-
15. The method of claim 11 further comprising:
when a client unit calls the trampoline function, executing the instructions of the trampoline function, whereby control passes to the unit activation function, bypassing the detour function.
-
16. The method of claim 11 wherein the step of replacing comprises:
with a binary rewriter, overwriting the beginning of the unit activation function with a jump instruction for transferring control to the detour function.
-
17. The method of claim 11 wherein the plural instructions of the unit activation function comprise variable length instructions, and wherein the step of creating a trampoline function comprises:
-
determining the size of a jump instruction;
with a decoder, parsing the plural instructions of the unit activation function;
selecting one or more instructions at the beginning of the unit activation function, wherein the total size of the selected instructions is at least as large as the size of the jump instruction;
writing the selected one or more instructions at the beginning of the trampoline function; and
writing a jump instruction in the trampoline function for transferring control to the unit activation function, wherein the jump instruction transfers control to an address offset from the beginning of the unit activation function by an amount equal to the size of the selected one or more instructions.
-
-
18. A computer-readable medium having computer-executable instructions for performing the method of claim 17.
-
19. The method of claim 11 wherein the plural instructions of the unit activation function comprise fixed length instructions, and wherein the step of creating a trampoline function comprises:
-
selecting an instruction at the beginning of the unit activation function;
writing the selected instruction at the beginning of the trampoline function; and
writing a jump instruction in the trampoline function for transferring control to the unit activation function, wherein the jump instruction transfers control to an address offset from the beginning of the unit activation function by an amount equal to the size of one instruction.
-
-
20. The method of claim 11 wherein the steps of identifying a detour function, identifying a unit activation function, creating a trampoline function, and replacing occur at run time.
-
21. The method of claim 11 wherein the steps of identifying a detour function, identifying a unit activation function, creating a trampoline function, and replacing occur before run time.
-
22. The method of claim 11 further comprising:
-
during the step of executing the instructions of the detour function, calling the trampoline function, whereby the instructions of the trampoline function execute and control passes to the unit activation function;
after the unit activation function finishes, transferring control to an instrumentation function.
-
-
23. The method of claim 11 further comprising:
-
during the step of executing the instructions of the detour function, calling the trampoline function, whereby the instructions of the trampoline function execute and control passes to the unit activation function;
after the unit activation function finishes, transferring control to the detour function.
-
Specification