Method, apparatus, and product for dynamic software code translation system
First Claim
1. A computer implemented method for emulating and translating software executing a user process in memory;
- the user process comprising one or more blocks of instructions of executable code, and machine states;
comprising,a. retrieving and storing the machine states;
b. identifying sequences of the executable code that comprise the block of executable code;
c. establishing an altered machine state to enable translation of the identified block of executable code to execute in the user process;
d. translating the identified block of executable code if the identified block of executable code will execute at least a threshold number of times;
e. analyzing the translated block of executable code to determine whether alterations can be made to enable faster execution of the translated executable code on the computer, and making the alterations for faster execution;
f. executing the translated block of executable code;
g. establishing an altered machine state to enable emulation of the identified block of executable code to execute in the user process; and
h. emulating the identified block of executable code if the identified block of executable code will execute less than a threshold number of times.
3 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for improving the process of software development by a dynamic software development tool. The present invention efficiently executes in a user process and provides software developers with a high performance tool for software optimization. The present invention may augment the user process code instructions at runtime and, for every series of machine instructions that the original user source code would have executed, a series of instructions may be executed that are semantically equivalent to the user process code instructions and are altered to optimize the user process code instructions. The present invention may use emulation or translation to alter the user process code instructions. The resulting process is executed in the user process space and advantageously maintains the original flow of instruction execution. The present invention employs a technique of dynamically translating code at runtime and may operate on a virtual machine or a hardware machine. Further, the present invention may operate on various types of code segments and is not, for instance, limited to manipulating only code modules and may operate on a basic code block. Therefore, the present invention enables efficient optimized user process code instruction debugging, instrumentation, and simulation by preserving the original flow of user process code instructions while enabling emulation and translation on the original user process code instructions.
166 Citations
25 Claims
-
1. A computer implemented method for emulating and translating software executing a user process in memory;
- the user process comprising one or more blocks of instructions of executable code, and machine states;
comprising,a. retrieving and storing the machine states; b. identifying sequences of the executable code that comprise the block of executable code; c. establishing an altered machine state to enable translation of the identified block of executable code to execute in the user process; d. translating the identified block of executable code if the identified block of executable code will execute at least a threshold number of times; e. analyzing the translated block of executable code to determine whether alterations can be made to enable faster execution of the translated executable code on the computer, and making the alterations for faster execution; f. executing the translated block of executable code; g. establishing an altered machine state to enable emulation of the identified block of executable code to execute in the user process; and h. emulating the identified block of executable code if the identified block of executable code will execute less than a threshold number of times. - View Dependent Claims (2, 3)
- the user process comprising one or more blocks of instructions of executable code, and machine states;
-
4. A computer implemented method for emulating and translating software executing a user process in memory;
- the user process comprising one or more blocks of instructions of executable code, one or more traces of the blocks of instructions, and machine states;
comprising;a. retrieving and storing machine states; b. identifying sequences of the instructions of executable code that comprise the block of instructions, and identifying the blocks of executable code that comprise the instruction trace; c. establishing an altered machine state to enable translation of the identified blocks of executable code to execute in the user process; d. translating the identified blocks of executable code if the identified instruction trace will execute at least a threshold number of times; e. analyzing the translated executable code to determine whether alterations can be made to enable faster execution of the translated executable code on the computer, and making the alterations for faster execution; f. executing the translated executable code; g. establishing an altered machine state to enable emulation of the identified blocks of executable code in the user process; and h. emulating the identified blocks of executable code if the identified instruction trace will execute less than a threshold number of times. - View Dependent Claims (5)
- the user process comprising one or more blocks of instructions of executable code, one or more traces of the blocks of instructions, and machine states;
-
6. A computer implemented dynamic software development tool that executes a user process in memory, the user process that is established by an operating system in the computer;
- the user process comprising one or more instructions of executable code, one or more blocks of instructions, one or more traces of one or more blocks of instructions, and machine states;
comprising,a. an original instruction processor that controls execution of the instruction; b. an execution interrupter that suspends the execution of the instruction in the computer operating system and continues the execution of the instruction under the control of the original instruction processor, and that returns control of the instruction back to the computer operating system when the original instruction processor has completed controlling the instruction execution; c. a machine state loader and preserver that loads and preserves the machine state during the execution of the instruction; d. a trace designator that designates the instructions that execute together into the block of instructions, and that designates the blocks of instructions that execute together into the trace;
that determines if the trace is hot, and that tags the hot trace; and
that establishes an altered the machine state that enables execution of the trace; ande. a trace translator that translates one or more traces that are tagged as hot; f. an instruction emulator that emulates the traces that are not tagged as hot; g. a trace selector that directs control of the instruction execution between the trace translator, the instruction emulator, and the translated trace; h. an augmenting tool that executes with the dynamic software development tool and the blocks of instructions; and i. a development tool manager that accesses the machine state from the machine state loader and preserver to determine whether to enable the augmenting tool. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
- the user process comprising one or more instructions of executable code, one or more blocks of instructions, one or more traces of one or more blocks of instructions, and machine states;
-
19. A computer implemented dynamic software development tool that executes a user process in memory, the user process that is established by an operating system in the computer;
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
comprising,a. a hot block identifier that determines if the executing instruction is hot, determines if the executing hot instruction initiates the block or ends the block in the programmed order, and tags the block having the hot instruction that initiates the block or ends the block; b. a hot trace selector that determines if the executing block is tagged as hot, that determines if the hot block is a member of the trace, and that tags the trace having the hot block member; c. a hot block translator-instrumenter that determines if the executing block is tagged as hot, creates translated instructions for the hot block, and stores the translated hot block instructions in the memory; and d. a hot trace detection instrumenter that determines if the block is a member of the hot trace and transfers hot trace tag information to the hot block identifier.
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
-
20. A computer implemented dynamic software development tool that executes a user process in memory, the user process that is established by an operating system in the computer;
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
comprising,a. a hot block identifier that determines if the executing instruction is hot, determines if the executing hot instruction initiates the block or ends the block in the programmed order, and tags the block having the hot instruction that initiates the block or ends the block; b. a hot trace selector that determines if the executing block is tagged as hot, that determines if the hot block is a member of the trace, and that tags the trace having the hot block member; c. a hot block translator-instrumenter that determines if the executing block is tagged as hot, creates translated instructions for the hot block, and stores the translated hot block instructions in the memory; d. a hot trace detection instrumenter that determines if the block is a member of the hot trace and transfers hot trace tag information to the hot block identifier; e. a cold block identifier that determines if there is sufficient space in the memory to continue to store the hot block, and if there is not sufficient space to continue to store the hot block changes the tag of the hot block; and f. a cold block manager that removes the translated hot block instructions from the memory when the block is tagged as cold.
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
-
21. A computer implemented dynamic software development tool that executes a user process in memory, the user process that is established by an operating system in the computer;
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
comprising,a. a hot block identifier that determines if the executing instruction is hot, determines if the executing hot instruction initiates the block or ends the block in the programmed order, and tags the block having the hot instruction that initiates the block or ends the block; b. a hot trace selector that determines if the executing block is tagged as hot, that determines if the hot block is a member of the trace, and that tags the trace having the hot block member; c. a hot block translator-instrumenter that determines if the executing block is tagged as hot, creates translated instructions for the hot block, and stores the translated hot block instructions in the memory; d. a hot trace detection instrumenter that determines if the block is a member of the hot trace and transfers hot trace tag information to the hot block identifier; and e. an optimizer that alters the translated hot block instructions for faster execution.
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
-
22. A computer implemented dynamic software development tool that executes a user process in memory, the user process that is established by an operating system in the computer;
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
comprising,a. a hot block identifier that determines if the executing instruction is hot, determines if the executing hot instruction initiates the block or ends the block in the programmed order, and tags the block having the hot instruction that initiates the block or ends the block; b. a hot trace selector that determines if the executing block is tagged as hot, that determines if the hot block is a member of the trace, and that tags the trace having the hot block member; c. a hot block translator-instrumenter that determines if the executing block is tagged as hot, creates translated instructions for the hot block, and stores the translated hot block instructions in the memory; d. a hot trace detection instrumenter that determines if the block is a member of the hot trace and transfers hot trace tag information to the hot block identifier; e. a cold block identifier that determines if there is sufficient space in the memory to continue to store the hot block, and if there is not sufficient space to continue to store the hot block changes the tag of the hot block; f. a cold block manager that removes translated hot block instructions from the memory when the block is tagged as cold; and g. an optimizer that alters the translated hot block instructions for faster execution.
- the user process comprising one or more instructions of executable code arranged in a programmed order, one or more blocks of instructions, and one or more traces of one or more blocks of instructions;
-
23. An article of manufacture comprising a computer product for emulating and translating an executing user process loaded in memory;
- the user process including one or more blocks of software instructions of executable code, and maintaining machine states;
comprising a program storage medium wherein;a. computer readable program code retrieves and stores the machine states; b. computer readable program code identifies the software instructions of executable that comprise the block; c. computer readable program code establishes an altered machine state to enable translation of the identified block of executable code to execute in the user process; d. computer readable program code translates the identified block of executable code if the identified block of executable code will execute at least a threshold number of times; e. computer readable program code analyzes the translated executable code to determine whether alterations can be made to enable faster execution of the translated executable code on the computer, and makes the alterations for faster execution; f. computer readable program code executes the translated executable code; g. computer readable program code establishes an altered machine state to enable emulation of the identified block of executable code in the user process; and h. computer readable program code emulates the executable code if the identified block of executable code will execute less than a threshold number of times.
- the user process including one or more blocks of software instructions of executable code, and maintaining machine states;
-
24. A computer program product for use with an appropriate computing system, for emulating and translating software executing a user process in memory;
- the user process comprising one or more blocks of instructions of executable code, and machine states;
comprising,a. retrieving and storing the machine states; b. identifying sequences of the instructions of executable code that comprise the block of executable code; c. establishing an altered machine state to enable translation of the identified block of executable code to execute in the user process; d. translating the identified block of executable code if the identified block of executable code will execute at least a threshold number of times; e. analyzing the translated executable code to determine whether alterations can be made to enable faster execution of the translated executable code on the computer, and making the alterations for faster execution; f. executing the translated executable code; g. establishing an altered machine state to enable emulation of the identified block of executable code in the user process; and h. emulating the identified block of executable code if the identified block of executable code will execute less than a threshold number of times.
- the user process comprising one or more blocks of instructions of executable code, and machine states;
-
25. A computer program product for use with an appropriate computing system, for emulating and translating software executing a user process in memory;
- the user process comprising one or more blocks of instructions of executable code, one or more instruction traces of the blocks of instructions, comprising;
a. retrieving and storing machine states; b. identifying sequences of the instructions of executable code that comprise the block of instructions, and identifying the blocks of executable code that comprise the instruction trace; c. establishing an altered machine state to enable translation of the identified blocks of executable code to execute in the user process; d. translating the identified blocks of executable code if the identified instruction trace will execute at least a threshold number of times; e. analyzing the translated executable code to determine whether alterations can be made to enable faster execution of the translated executable code on the computer, and making the alterations for faster execution; f. executing the translated executable code; g. establishing an altered machine state to enable emulation of the identified blocks of executable code in the user process; and h. emulating the executable code if the identified instruction trace will execute less than a threshold number of times.
- the user process comprising one or more blocks of instructions of executable code, one or more instruction traces of the blocks of instructions, comprising;
Specification