Method and apparatus for dynamically optimizing byte-coded programs
First Claim
1. A computer-implemented method for processing a computer program during run-time, the program including byte codes, the byte codes being arranged as a plurality of methods, the computer-implemented method comprising:
- invoking a first method selected from the plurality of methods, wherein invoking the first selected method includes interpreting the first selected method;
updating an invocation tracker arranged to track a number of invocations of the first selected method;
determining when the invocation tracker indicates that the number of invocations of the first selected method exceeds a threshold value; and
compiling the first selected method when it is determined that the invocation tracker indicates that the number of invocations of the first selected method exceeds the threshold value.
0 Assignments
0 Petitions
Accused Products
Abstract
Methods and apparatus for dynamically determining whether portions of code should be interpreted or compiled in order to optimize a software application during run-time are disclosed. According to one aspect of the present invention, computer-implemented method for run-time processing of a computer program which includes byte-codes arranged as a plurality of methods includes invoking a first method selected from the plurality of methods. Invoking the first selected method involves interpreting the first selected method. An invocation tracker which is arranged to track the number of invocations of the first selected method is updated, and a determination is made regarding when the invocation tracker indicates that the number of invocations of the first selected method exceeds a threshold value. The first selected method is compiled when it is determined that the invocation tracker indicates that the number of invocations of the first selected method exceeds a threshold value. This threshold value is periodically adjusted to keep the compilation and the interpretation overheads within acceptable ranges.
18 Citations
1 Claim
-
1. A computer-implemented method for processing a computer program during run-time, the program including byte codes, the byte codes being arranged as a plurality of methods, the computer-implemented method comprising:
-
invoking a first method selected from the plurality of methods, wherein invoking the first selected method includes interpreting the first selected method;
updating an invocation tracker arranged to track a number of invocations of the first selected method;
determining when the invocation tracker indicates that the number of invocations of the first selected method exceeds a threshold value; and
compiling the first selected method when it is determined that the invocation tracker indicates that the number of invocations of the first selected method exceeds the threshold value.
-
Specification