Dynamic compilation control
First Claim
1. A method of selecting certain portions of a computer program for compilation, the method comprising:
- computing an execution frequency threshold at which a decreasing hazard rate corresponds to a reciprocal of a break-even number of executions that recoup computational costs of compilation; and
during execution of the computer program, dynamically compiling individual ones of the portions based on the execution frequency thresholdwherein the hazard rate, hr(x), for a particular one of the computer program portions at least approximates a probability that the particular portion will stop being executed in the computer program given that the particular program has executed x times.
2 Assignments
0 Petitions
Accused Products
Abstract
Modern programming languages have stimulated work on systems that dynamically compile or optimize frequently executed portions of programs. In practice, such systems typically rely on ad hoc heuristics. For example, a system may optimize (or compile) some code once its execution count exceeds a given threshold. An analytical model has been developed that expresses performance of such a system. In one embodiment, the model is based on a bytecode frequency histogram, which indicates (for a given program) how many bytecodes run for how many times. It predicts that the optimal compilation threshold will occur where the hazard rate falls through the reciprocal of the break-even point, the number of times a compiled bytecode must be executed to recoup its compilation time. Based on the insight provided by the model, a dynamic compilation control technique has been developed.
25 Citations
20 Claims
-
1. A method of selecting certain portions of a computer program for compilation, the method comprising:
-
computing an execution frequency threshold at which a decreasing hazard rate corresponds to a reciprocal of a break-even number of executions that recoup computational costs of compilation; and during execution of the computer program, dynamically compiling individual ones of the portions based on the execution frequency threshold wherein the hazard rate, hr(x), for a particular one of the computer program portions at least approximates a probability that the particular portion will stop being executed in the computer program given that the particular program has executed x times. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. An computer-implemented execution environment for a computer program including execution codes that may optionally be executed in either a first or a second form thereof, the execution environment comprising:
-
a dynamic compilation mechanism that transforms an implementation of a particular one of the execution code in a first form to the second form thereof, wherein the second form is substantially optimized as compared to the first form; and a transformation threshold computation mechanism that computes, at least for the particular execution code, an execution frequency threshold at which a decreasing hazard rate corresponds to a reciprocal of a break-even number of executions that recoup computational costs of transformation to the second form, wherein the dynamic compilation mechanism is responsive to the computed execution frequency threshold; wherein the hazard rate, hr(x), for a particular one of the computer program portions at least approximates a probability that the particular portion will stop being executed in the computer program given that the particular program has executed x times. - View Dependent Claims (11, 12, 13)
-
-
14. A computer program product encoded in at least one computer readable medium, the computer program product comprising:
-
first instructions executable on a processor to instrument execution of a computer program executing thereon, the first instructions providing data indicative of execution frequency for at least a particular portion of the computer program; and second instructions executable to identify a particular execution frequency threshold in the execution of the computer program at which a decreasing hazard rate calculated from the execution frequency data for the particular portion of the computer program corresponds to a reciprocal of a break-even number of executions thereof that recoup computational costs of transformation to an optimized form wherein the hazard rate, hr(x), for a particular one of the computer program portions at least approximates a probability that the particular portion will stop being executed in the computer program given that the particular program has executed x times, wherein the execution frequency threshold identified by the second instructions for a particular portion of the computer program indicates an opportunity to dynamically compile the particular portion of the computer program. - View Dependent Claims (15, 16, 17, 18, 19)
-
-
20. An apparatus comprising:
-
means which is encoded in at least one computer-readable media, for measuring execution frequency for at least a particular execution code and, based thereon, determining in an execution of computer code that includes the particular execution code a execution frequency threshold at which a decreasing hazard rate corresponds to a reciprocal of a break-even number of executions that recoup computational costs of transformation to the optimized form; and means which is encoded in at least one computer-readable media, for dynamically transforming an implementation of the particular execution code, based on the execution frequency threshold determined by the measuring means, to an optimized form thereof; wherein the hazard rate, hr(x), for a particular one of the computer program portions at least approximates a probability that the particular portion will stop being executed in the computer program given that the particular program has executed x times.
-
Specification