Method and system of adaptive dynamic compiler resolution
First Claim
1. A computer-implemented method comprising:
- identifying during compilation a code portion in source code of an application, wherein the code portion requires a dynamic data value, wherein a dynamic data value is a data value that changes based on execution behavior of the application;
generating a compiled version of the code portion optimized for a general value of the dynamic data value;
generating a series of instructions to be executed when the application is executed, wherein the series of instructions is configuredto monitor a plurality of executions of the compiled version of the code portion to determine a first frequently occurring value of the dynamic data value,to generate a first optimized code portion corresponding to the code portion using the first frequently occurring value, wherein subsequent execution flow is directed to the first optimized code portion when the first frequently occurring value is used;
to monitor the ongoing execution of the compiled version of the code portion to determine one or more additional frequently occurring values of the dynamic data value, andto generate new optimized code portions using the additional frequently occurring values, wherein subsequent execution flow is directed to the new optimized code portions when the corresponding new frequently occurring value is used and wherein one of the new optimized code portions replaces the first optimized code code portion; and
inserting the series of instructions in a compiled version of the source code.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system of adaptive dynamic compiler resolution. At least some of the illustrative embodiments are a computer-implemented method comprising compiling a source file containing an application program (the application program comprising a method, and wherein the compiling creates a destination file containing a compiled version of the application program), and inserting in the compiled version of the application program a series of commands that (when executed at run time of the application program) generate a first optimized version of the method using a first value available at run time, and generate a second optimized version of the method using a second value available at run time.
-
Citations
17 Claims
-
1. A computer-implemented method comprising:
-
identifying during compilation a code portion in source code of an application, wherein the code portion requires a dynamic data value, wherein a dynamic data value is a data value that changes based on execution behavior of the application; generating a compiled version of the code portion optimized for a general value of the dynamic data value; generating a series of instructions to be executed when the application is executed, wherein the series of instructions is configured to monitor a plurality of executions of the compiled version of the code portion to determine a first frequently occurring value of the dynamic data value, to generate a first optimized code portion corresponding to the code portion using the first frequently occurring value, wherein subsequent execution flow is directed to the first optimized code portion when the first frequently occurring value is used; to monitor the ongoing execution of the compiled version of the code portion to determine one or more additional frequently occurring values of the dynamic data value, and to generate new optimized code portions using the additional frequently occurring values, wherein subsequent execution flow is directed to the new optimized code portions when the corresponding new frequently occurring value is used and wherein one of the new optimized code portions replaces the first optimized code code portion; and inserting the series of instructions in a compiled version of the source code. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer readable medium storing a computer program that when executed by a processor, performs a method comprising:
-
identifying during compilation a code portion in source code of an application, wherein a dynamic data value is a data value that changes based on execution behavior of the application; generating a compiled version of the code portion optimitzed for a general value of the dynamic data value; generating a series of instructions to be executed when the application is executed, wherein the series of instructions is configured to monitor a plurality of executions of the compiled version of the code portion to determine a first frequently occurring value of the dynamic data value, and to generate a first optimized code portion corresponding to the code portion using the first frequently occurring value of the dynamic data value, and to generate a first optimized code portion corresponding to the code portion using the first frequently occurring value, wherein subsequent execution flow is directed to the first optimized code portion when the first frequently occurring value is used; to monitor the ongoing execution of the compiled version of the code portion to determine one or more additional frequently occurring values of the dynamic data value, and to generate new optimized code portions using the additional frequently occurring values, wherein subsequent execution flow is directed in the new optimized code portions when the corresponding new frequently occurring value is used and wherein one of the new optimized code portions replaces the first optimized code code portion; and inserting the series of instructions in a compiled version of the source code file. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A system comprising;
-
a memory configured to store a source code of an application; a processor coupled to the memory; and a compiler configured to execute on the processor to compile the source code, wherein compiling the source code portion of the source code, wherein the code portion requires a dynamic data value, wherein a dynamic data value is a data that changes based on execution behavior of the application; generating a compiled version of the code portion optimized for a general value of the dynamic data value; generating a series of instructions to be executed when the application is executed wherein the series of instructions is configured to monitor a plurality of executions of the compiled version of the code portion to determine a first frequently occurring value of the dynamic data value, to generate a first optimized code portion corresponding to the code portion using the first frequently occurring value, wherein subsequent execution flow is directed to the first optimized code portion when the first frequently occurring value is used, to monitor the ongoing execution of the compiled version of the code portion to determine one or more additional frequently occurring values of the dynamic data value and to generate new optimized code portions using the additional frequently occurring values wherein subsequent execution flow is directed to the new optimized code portions when the corresponding new frequently occurring value is used and wherein one of the new optimized code portions replaces the first optimized code code portion; and inserting a call to the series of instructions in a compiled version of the source code file. - View Dependent Claims (14, 15, 16, 17)
-
Specification