IP Library Granted Patent US 9,766,911
Granted Patent B2
US 9,766,911 · App. 12/429,399 · Granted Sep 19, 2017

Support for a non-native application

Inventors: Abhinav Das (Sunnyvale, CA); Jiwei Lu (Pleasanton, CA); William Y. Chen (Los Altos, CA); Chandramouli Banerjee (Fremont, CA)
Assignee: ORACLE AMERICA, INC.
G06F9/45504G06F9/45516G06F11/3612G06F11/3636
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 9,766,911
App. No.
12/429,399
Granted
Sep 19, 2017
Kind
B2
Abstract

Aspects of the invention are directed to a systems and methods for operating a non-native binary in dynamic binary translation environment. In accordance with an embodiment, there is provided a computer program product in a computer readable medium. The product includes program code for receiving a non-native binary in a computer readable medium and program code for translating the non-native binary. Additionally, the product includes program code for executing the translated non-native binary, the non-native binary including one or more threads, and program code for pausing execution of the translated non-native binary. The product also includes program code for providing guest instruction boundary information to a monitoring process and program code for analyzing a state of each thread of the translated non-native binary. Moreover, the product includes program code for fast-forwarding at least one thread so that its state is consistent with the guest instruction boundary.

Claims (52)

1. One or more non-transitory computer readable media comprising instructions which, when executed by one or more hardware processors, cause performance of operations comprising:

translating a non-native binary using a binary translator to obtain a translated non-native binary, wherein a particular non-native binary instruction is translated to a plurality of translated non-native binary instructions, and wherein an instruction boundary associated with the particular non-native binary instruction corresponds to a last instruction in the plurality of translated non-native binary instructions;

beginning execution of the translated non-native binary on a host operating system;

during execution of a particular translated non-native binary instruction of the plurality of translated non-native binary instructions: receiving a command to pause execution of the translated non-native binary;

responsive to receiving the command: pausing execution of the translated non-native binary after executing the particular translated non-native binary instruction of the plurality of translated non-native binary instructions and before executing a next instruction of the plurality of translated non-native binary instructions;

determining, by a monitoring process, that the execution of the translated non-native binary has not been paused at any instruction boundary associated with the non-native binary;

causing, by the monitoring process, execution of at least the last instruction of the particular plurality of translated non-native binary instructions to reach the instruction boundary associated with the particular non-native binary instruction; and

pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction.

2. The media of claim 1 , wherein the operations further comprise: saving a state of the non-native binary after pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction.

3. The media of claim 1 , wherein the operations further comprise: exporting, to the monitoring process, a state of the non-native binary after pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction.

4. The media of claim 3 wherein the monitoring process comprises a non-native process different than the non-native binary.

5. The media of claim 1 , wherein the operations further comprise:

determining if an address space of the non-native binary has been modified; and

routing execution of the translated non-native binary through a special service routine if the address space is modified.

6. The media of claim 5 wherein routing execution of the translated non-native binary through the special service routine comprises:

flushing cache code; and

translating the address space of the non-native binary that has been modified.

7. The media of claim 5 wherein determining if the address space of the non-native binary has been modified is based on a /proc/pid/as file of the non-native binary.

8. A system comprising:

at least one device including a hardware processor; and

the system configured to perform operations comprising:

translating a non-native binary using a binary translator to obtain a translated non-native binary, wherein a particular non-native binary instruction is translated to a plurality of translated non-native binary instructions, and wherein an instruction boundary associated with the particular non-native binary instruction corresponds to a last instruction in the plurality of translated non-native binary instructions;

beginning execution of the translated non-native binary on a host operating system;

during execution of a particular translated non-native binary instruction of the plurality of translated non-native binary instructions: receiving a command to pause execution of the translated non-native binary;

responsive to receiving the command: pausing execution of the translated non-native binary after executing the particular translated non-native binary instruction of the plurality of translated non-native binary instructions and before executing a next instruction of the plurality of translated non-native binary instructions;

determining, by a monitoring process, that the execution of the translated non-native binary has not been paused at any instruction boundary associated with the non-native binary;

causing, by the monitoring process, execution of at least the last instruction of the particular plurality of translated non-native binary instructions to reach the instruction boundary associated with the particular non-native binary instruction; and

pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction.

9. The system of claim 8 wherein the operations further comprise: exporting a register state of the non-native binary after pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction.

10. The system of claim 9 wherein the register state is exported to an offset address relative to a binary translator in a computer readable medium.

11. The system of claim 8 wherein the operations further comprise: reading a register state of the non-native binary by opening a /proc/pid/as file of the non-native binary.

12. The system of claim 8 , wherein the operations further comprise: reading, by a second non-native binary, a register state of the non-native binary.

13. The media of claim 1 wherein the instruction boundary associated with the particular non-native binary instruction indicates a stopping point in the plurality of translated non-native binary instructions.

14. The media of claim 1 , wherein the operations further comprise: exporting a state of the non-native binary, after pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction, to an offset address relative to a binary translator.

15. A method, comprising:

translating a non-native binary using a binary translator to obtain a translated non-native binary, wherein a particular non-native binary instruction corresponds to a particular plurality of translated non-native binary instructions, and wherein an instruction boundary associated with the particular non-native binary instruction corresponds to a last instruction in the particular plurality of translated non-native binary instructions;

beginning execution of the translated non-native binary on a host operating system;

during execution of a particular translated non-native binary instruction of the plurality of translated non-native binary instructions: receiving a command to pause execution of the translated non-native binary;

responsive to receiving the command: pausing execution of the translated non-native binary after executing the particular translated non-native binary instruction of the plurality of translated non-native binary instructions and before executing a next instruction of the plurality of translated non-native binary instructions;

determining, by a monitoring process, that the execution of the translated non-native binary has not been paused at any instruction boundary associated with the non-native binary;

causing, by the monitoring process, execution of at least the last instruction of the particular plurality of translated non-native binary instructions to reach the instruction boundary associated with the particular non-native binary instruction; and

pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction;

wherein the method is performed by at least one device including a hardware processor.

16. The method of claim 15 , further comprising: exporting, to the monitoring process, a state of the non-native binary after pausing execution of the translated non-native binary when the last instruction has been executed to reach the instruction boundary associated with the particular non-native binary instruction.

17. The method of claim 16 , wherein the monitoring process comprises a non-native process different than the non-native binary.

18. The method of claim 15 , further comprising:

determining whether an address space of the non-native binary has been modified; and

routing execution of the translated non-native binary through a special service routine if the address space is modified.

19. The method of claim 18 , wherein routing execution of the translated non-native binary through a special service routine comprises:

flushing code cache; and

translating the address space of the non-native binary that has been modified.

20. The method of claim 18 , wherein determining whether the address space of the non-native binary has been modified is based on a prod/pid/as file of the non-native binary.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE MERGED ENTITY'S ADDRESS PREVIOUSLY RECORDED AT REEL: 038247 FRAME: 0671. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Jun 21, 2016
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 039113/0303 →
MERGER AND CHANGE OF NAME Recorded Apr 11, 2016
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 038247/0671 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 24, 2009
From: DAS, ABHINAV; LU, JIWEI; CHEN, WILLIAM Y.; BANERJEE, CHANDRAMOULI
To: SUN MICROSYSTEMS, INC.
Reel/Frame 022593/0256 →
Continuity (1)
Related Publication 20100274551A1 · Oct 28, 2010