IP Library Granted Patent US 10,592,387
Granted Patent B2
US 10,592,387 · App. 15/859,965 · Granted Mar 17, 2020

Dataflow analysis to reduce the overhead of on stack replacement

Inventors: Andrew Craik (North York, CA); Joseph Devin Micheal Papineau (Markham, CA); Vijay Sundaresan (North York, CA)
Assignee: International Business Machines Corporation
G06F11/3612G06F8/4441G06F8/4443G06F9/4552G06F9/45525G06F9/45529
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 10,592,387
App. No.
15/859,965
Granted
Mar 17, 2020
Kind
B2
Abstract

An approach is provided in which an information handling system selects a first point in a software program corresponding to a compile-time assumption made by a compiler. The information handling system then selects a set of second points in the software program corresponding to a set of locations at which the compile-time assumption can be violated at runtime. Next, the information handling system starts at the first point and propagates backwards in the software program to identify one or more of the second points that are reached from the backwards propagation. The information handling system then inserts conditional transitions in the software program at each of the identified assumption violation points and executes a compiled version of the software program, resulting in an evaluation of the compile-time assumption at the conditional transitions.

Claims (50)

1. A method implemented by an information handling system that includes a memory and a processor, the method comprising:

selecting a first point in a software program corresponding to a compile-time assumption made by a compiler;

selecting a set of second points corresponding to a set of locations in the software program at which the compile-time assumption can be violated at runtime;

starting at the first point, propagating backwards in the software program and inserting one or more conditional transitions in the software program where at least one of the set of second points are reached during the backwards propagation; and

executing a compiled version of the software program, resulting in an evaluation of the compile-time assumption at the one or more conditional transitions.

2. The method of claim 1 wherein the selecting of the first point further comprises:

identifying a guard in the software program that checks whether a method is redefined; and

replacing the guard with the first point, wherein the first point corresponds to an assumption that the method is not redefined during the executing of the compiled version of the software program.

3. The method of claim 2 wherein the guard is selected from the group consisting of a hot code replace guard and a virtual guard.

4. The method of claim 1 wherein the propagating backwards further comprises:

performing a backwards unioning data flow analysis using the first point and the set of second points.

5. The method of claim 1 wherein the software program fails to include the one or more conditional transitions at each one of the set of second points that were not reached during the backwards propagation.

6. The method of claim 1 wherein:

the software program comprises intermediate representations generated from bytecode; and

the one or more conditional transitions are on stack replacement transitions.

7. The method of claim 1 wherein the one or more conditional transitions are implemented by a runtime code patching framework during execution, wherein the runtime code patching framework modifies at least one registered position in the compiled version of the software program based on one or more runtime events.

8. An information handling system comprising:

one or more processors;

a memory coupled to at least one of the processors;

a set of computer program instructions stored in the memory and executed by at least one of the processors in order to perform actions of:

selecting a first point in a software program corresponding to a compile-time assumption made by a compiler;

selecting a set of second points corresponding to a set of locations in the software program at which the compile-time assumption can be violated at runtime;

starting at the first point, propagating backwards in the software program and inserting one or more conditional transitions in the software program where at least one of the set of second points are reached during the backwards propagation; and

executing a compiled version of the software program, resulting in an evaluation of the compile-time assumption at the one or more conditional transitions.

9. The information handling system of claim 8 wherein the processors perform additional actions comprising:

identifying a guard in the software program that checks whether a method is redefined; and

replacing the guard with the first point, wherein the first point corresponds to an assumption that the method is not redefined during the executing of the compiled version of the software program.

10. The information handling system of claim 9 wherein the guard is selected from the group consisting of a hot code replace guard and a virtual guard.

11. The information handling system of claim 8 wherein the processors perform additional actions comprising:

performing a backwards unioning data flow analysis using the first point and the set of second points.

12. The information handling system of claim 8 wherein the software program fails to include the one or more conditional transitions at each one of the set of second points that were not reached during the backwards propagation.

13. The information handling system of claim 8 wherein:

the software program comprises intermediate representations generated from bytecode; and

the one or more conditional transitions are on stack replacement transitions.

14. The information handling system of claim 8 wherein the one or more conditional transitions are implemented by a runtime code patching framework during execution, wherein the runtime code patching framework modifies at least one registered position in the compiled version of the software program based on one or more runtime events.

15. A computer program product comprising a computer readable storage medium, storing computer program code that, when executed by an information handling system, causes the information handling system to perform actions comprising:

selecting a first point in a software program corresponding to a compile-time assumption made by a compiler;

selecting a set of second points corresponding to a set of locations in the software program at which the compile-time assumption can be violated at runtime;

starting at the first point, propagating backwards in the software program and inserting one or more conditional transitions in the software program where at least one of the set of second points are reached during the backwards propagation; and

executing a compiled version of the software program, resulting in an evaluation of the compile-time assumption at the one or more conditional transitions.

16. The computer program product of claim 15 wherein the information handling system performs further actions comprising:

identifying a guard in the software program that checks whether a method is redefined; and

replacing the guard with the first point, wherein the first point corresponds to an assumption that the method is not redefined during the executing of the compiled version of the software program.

17. The computer program product of claim 16 wherein the guard is selected from the group consisting of a hot code replace guard and a virtual guard.

18. The computer program product of claim 15 wherein the information handling system performs further actions comprising:

performing a backwards unioning data flow analysis using the first point and the set of second points.

19. The computer program product of claim 15 wherein the software program fails to include the one or more conditional transitions at each one of the set of second points that were not reached during the backwards propagation.

20. The computer program product of claim 15 wherein:

the software program comprises intermediate representations generated from bytecode; and

the one or more conditional transitions are on stack replacement transitions.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 2, 2018
From: CRAIK, ANDREW; PAPINEAU, JOSEPH DEVIN MICHEAL; SUNDARESAN, VIJAY
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 044515/0364 →
Continuity (1)
Related Publication 20190205240A1 · Jul 4, 2019