|Publication number||US20060026580 A1|
|Application number||US 11/189,411|
|Publication date||Feb 2, 2006|
|Filing date||Jul 26, 2005|
|Priority date||Jul 27, 2004|
|Also published as||EP1622009A1, US7260682, US7493476, US7500085, US7533250, US7543285, US7546437, US7574584, US7587583, US7606977, US7624382, US7743384, US7752610, US7757223, US7930689, US8024554, US8024716, US8046748, US8078842, US8185666, US8380906, US8516496, US20060023517, US20060025986, US20060026126, US20060026183, US20060026200, US20060026201, US20060026312, US20060026322, US20060026353, US20060026354, US20060026357, US20060026370, US20060026390, US20060026391, US20060026392, US20060026393, US20060026394, US20060026395, US20060026396, US20060026397, US20060026398, US20060026400, US20060026401, US20060026402, US20060026403, US20060026404, US20060026405, US20060026407, US20060026412, US20060026563, US20060026564, US20060026565, US20060026566, US20060026571, US20060026574, US20060026575|
|Publication number||11189411, 189411, US 2006/0026580 A1, US 2006/026580 A1, US 20060026580 A1, US 20060026580A1, US 2006026580 A1, US 2006026580A1, US-A1-20060026580, US-A1-2006026580, US2006/0026580A1, US2006/026580A1, US20060026580 A1, US20060026580A1, US2006026580 A1, US2006026580A1|
|Inventors||Gilbert Cabillic, Mikael Peltier, Jean-Philippe Lesot|
|Original Assignee||Texas Instruments Incorporated|
|Export Citation||BiBTeX, EndNote, RefMan|
|Referenced by (34), Classifications (11), Legal Events (1)|
|External Links: USPTO, USPTO Assignment, Espacenet|
This application claims the benefit of European Patent Application No. 04291918.3, filed Jul. 27, 2004, incorporated by reference herein as if reproduced in full below. This application is related to co-pending and commonly assigned application Ser. No. ______ [atty. docket TI-38588 (1962-22900)] entitled “Method And System Of Adaptive Compiler Resolution.”
1. Technical Field of the Invention
Embodiments of the present invention relate to compilers and creation of optimized executable code.
2. Background Information
A compiler is a software program that takes a source file containing a program in a particular form, and converts the program to another form. In some cases, the compiler starts with a human-readable source code file (e.g. a program written in JAVA™ or C++) and converts or compiles to a binary file that may be directly executable or that may require interpretation or further compiling.
Compilers come in several varieties, such as static compilers (sometimes referred to as “ahead-in-time” compilers) or dynamic compilers (sometimes referred to as “just-in-time” compilers). Static compilers complete their work on the source file before the program is executed. Dynamic compilers, by contrast, compile the source file during execution of the program embodied in the source file. Both static and dynamic compilers also may perform optimization as part of the compiling processing, possibly to reduce execution time.
Static compilers perform some optimizations, such as inlining of methods, but in many cases optimization requires the knowledge of values of runtime parameters which are not known when static compiling is performed. Dynamic compilers thus have the advantage of having available the values of runtime parameters, and thus may make optimizations based on those parameters, but gain realized by optimization performed by dynamic compilers is offset by the fact the compiler too is running and sharing time on the processor, thus slowing the overall execution of the application program.
The problems noted above are solved in large part by a method and related system of dynamic compiler resolution. Some of the illustrative embodiments are a computer-implemented method comprising compiling a source file containing an application program (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 an optimized code portion using a value available at run time.
Other illustrative embodiments are a computer-readable medium storing a compiler program that performs a method comprising compiling source code of an application program to create 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 optimized code using a value available at run time.
Yet still other illustrative embodiments are a system comprising a memory (wherein the memory contains a source file of an program), and a first processor coupled to the memory. The first processor is configured to compile the program of the source file to create a compiled program, and the processor is configured to insert in the compiled program a series of commands that (when executed at run time) generate an optimized code portion using a value available at run time.
Certain terms are used throughout the following description and claims to refer to particular system components. As one skilled in the art will appreciate, semiconductor companies may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . ”. Also, the term “couple” or “couples” is intended to mean either an indirect or direct connection. Thus, if a first device couples to a second device, that connection may be through a direct connection, or through an indirect connection via other devices and connections.
For a more detailed description of the preferred embodiments of the present invention, reference will now be made to the accompanying drawings, wherein:
The following discussion is directed to various embodiments of the invention. Although one or more of these embodiments may be preferred, the embodiments disclosed should not be interpreted, or otherwise used, as limiting the scope of the disclosure, unless otherwise specified. In addition, one skilled in the art will understand that the following description has broad application, and the discussion of any embodiments is meant only to be exemplary of those embodiments, and not intended to intimate that the scope of the disclosure is limited to those embodiments.
Moreover, the various embodiments were developed in the context of processors executing Java™ bytecodes, and thus the description is related to the developmental context; however, the various embodiments find application outside the Java environment, such as Microsoft's “.NET” (pronounced “dot net”) framework or in programs written in C and C++, and thus the description in relation to a Java environment should not be construed as a limitation as to the breadth of the disclosure.
Java is a programming language that, at the source code level, is similar to object oriented programming languages such as C++. Java language source code is compiled into an intermediate representation based on a plurality hardware platform independent “bytecodes” that define specific tasks. An “opcode” is a single member of the group bytecodes. In some implementations, the bytecodes are further compiled to machine language for a particular processor. Some processors, however, are designed to execute some or all the Java bytecodes directly.
Bytecodes 112 may be provided to the JVM 108, possibly compiled by compiler 110, and provided to the JSM 102 and/or MPU 104 for execution. In accordance with some embodiments of the invention, the JSM 102 may execute at least some Java bytecodes directly. When appropriate, however, the JVM 108 may also request the MPU 104 to execute one or more Java bytecodes not executed or executable by the JSM 102. In addition to executing compiled Java bytecodes, the MPU 104 also may execute non-Java instructions. The MPU 104 may thus also host an operating system (“O/S”) (not specifically shown) which performs various functions such as system memory management, system task management that schedules the software aspects of the JVM 108 and most or all other native tasks running on the system, management of the display 114, and receiving input from input devices (not specifically shown). Java code, whether executed on the JSM 102 or MPU 104, may be used to perform any one of a variety of applications such as multimedia, games or web based applications in the system 100, while non-Java code, which may comprise the O/S and other native applications, may still run on the system on the MPU 104.
Regardless of the form of the source and destination files, in accordance with embodiments of the invention the compiler inserts into the compiled version of the application program in the destination file a series of commands 206. The terms “series of commands” are used to distinguish the original method; however, the series of commands may be another method of the application program, albeit drafted by the compiler rather than the author of the source code. The series of commands 206 are generated by the compiler such that when the application program is actually executed, and in particular when the series of commands 206 as part of the application program are executed, the series of commands determine a value of a parameter which is available at runtime (and which may not have been available in a static compiling), and the series of commands generate an optimized version of the method based on the value. For example, an indirect reference both in the human-readable source code file and the compiled version of the application program may be resolved at run time, and the illustrative method may be optimized using the resolved value.
In accordance with at least some embodiments, the series of commands may be executed multiple times, and each time generate the optimized version of the method that is thereafter executed. In alternative embodiments, however, the series of commands 206 are further configured to replace themselves with the optimized method 208, thus creating a modified destination file 210. In these embodiments, the series of commands execute one time, to determine the value of interest, generate an optimized method based on that value, and overwrite the series of commands with the optimized method.
Still referring to
The series of commands, executed as part of the application program and not the compiler program, generate the optimized method using the value available at run time (block 320). Moreover, and in at least some embodiments, the series of commands overwrite themselves with the optimized method (block 324). In some embodiments the series of commands are overwritten only in the copy of the application program stored in volatile memory (e.g., RAM), but not in the compiled version of the application stored on a non-volatile memory (e.g., a disk drive). If the value available at run time is expected to the same each and every time the application program thereafter runs, then the series of commands may also be overwritten on non-volatile memory device.
The discussion of the various embodiments to this point has assumed that sufficient optimization of the overall application program may be achieved with an optimized method for only one run time value, and this assumption is valid in many situations. In alternative embodiments, however, an illustrative method may be optimized based on several values available at run time, and further still, the values for which the method is optimized may change over the course of the execution of the application program.
In accordance with these alternative embodiments, the compiler inserts into the compiled version of the destination file a series of commands 406. The series of commands 406 are generated by the compiler such that when the application program is actually executed, and in particular when the series of commands 406 as part of the application program are executed, the series of commands perform several actions. In particular, the series of commands may implement dynamic monitoring code 408 (discussed more fully below), and may also determine a value or values of parameters which are available at run time (and which may not have been available in a static compiling). Further, the series of commands 406 also generate optimized versions of the method based on the value or values determined by the dynamic monitoring code 408.
In accordance with these alternative embodiments, the dynamic monitoring code 408 runs as part of the application program, and determines which run time values are predominantly used by the method 410 (which is method 402 compiled and optimized (to the extent possible) for general data). The terms “dynamic monitoring code” are used to distinguish the original method; however, the dynamic monitoring code may be another method of the application program, albeit drafted by the compiler rather than the author of the source code. Stated otherwise, the dynamic monitoring code 408 (part of the series of commands written by the compiler) monitors a plurality of executions of the method 410, and determines which run time values are predominantly used. Based on this determination, the series of commands 406 then generate a plurality of optimized versions of the method 402/410 (e.g., first optimized method 412 and a second optimized method 414), one each for each of the predominantly used values, and writes the optimized methods to the modified destination file 416. Although not specifically shown in
In accordance with some embodiments, when a plurality of predominantly used run time values has been determined, the optimized methods overwrite the dynamic monitoring code in the modified destination file. In alternative embodiments, however, the dynamic monitoring code remains, and in the event the predominantly used run time values change over the course of executing the application program, the dynamic monitor code 408 generates new optimized methods that either replace or augment the previously generated optimized methods.
Still referring to
The run time portion of the various embodiments start (block 516) with execution of the application program, and the series of commands monitor a plurality of executions of the method optimized for general data (block 518). Based on data obtained from the monitoring, a determination is made as to whether there are any predominantly used values (block 520). If there are no predominantly used values, the illustrative method retreats to further monitoring (block 518). If there are predominantly used values (again block 520), a determination is made as to whether optimized versions of the method have already been generated for those values (block 522). If so, then the illustrative method retreats again to monitoring execution of the method optimized for general data (block 518). If, on the other hand, the illustrative method has not generated an optimized method for the predominantly used values, optimized methods are generated and written to the modified destination file (block 524). In some embodiments, each method optimized for a particular value is retained, and further optimized methods added. In cases where storage space in the modified destination file is limited, each time an optimized method is generated it may overwrite other optimized versions of the method. Further still, if storage space is an issue, the dynamic monitor code may be overwritten. Stated otherwise, once one or more predominantly used values are determined, the illustrative method may no longer perform the dynamic monitoring.
System 100 may be implemented as a mobile cell phone such as that shown in
From the description provided herein, those skilled in the art are readily able to combine software created as described with appropriate general purpose or a special purpose computer hardware to create a computer system and/or computer subcomponents embodying aspects of the invention, to create a computer system and/or computer subcomponents for carrying out the method embodiments of the invention, and/or to create a computer-readable medium storing a software program to implement method aspects of the various embodiments. Moreover, the embodiments of the illustrative methods could be implemented together in a single program (with various subroutines), or split up into two or more programs executed on the processor.
While the various embodiments of the invention have been shown and described, modifications thereof can be made by one skilled in the art without departing from the spirit and teachings of the invention. The embodiments described herein are illustrative only, and are not intended to be limiting. Many variations and modifications of the invention disclosed herein are possible and are within the scope of the invention. For example, compiling in accordance with embodiments of the invention may take place statically (ahead-in-time) or dynamically. Each and every claim is incorporated into the specification as an embodiment of the present invention.
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US7643818||Nov 21, 2005||Jan 5, 2010||Seven Networks, Inc.||E-mail messaging to/from a mobile terminal|
|US7769400||Aug 11, 2008||Aug 3, 2010||Seven Networks International Oy||Connectivity function for forwarding e-mail|
|US7904101||Mar 8, 2011||Seven Networks International Oy||Network-initiated data transfer in a mobile network|
|US8010082||Oct 19, 2005||Aug 30, 2011||Seven Networks, Inc.||Flexible billing architecture|
|US8069440 *||Oct 27, 2006||Nov 29, 2011||Oracle America, Inc.||Adaptive code through self steered execution|
|US8127342||Sep 23, 2010||Feb 28, 2012||Seven Networks, Inc.||Secure end-to-end transport through intermediary nodes|
|US8209709||Jul 5, 2010||Jun 26, 2012||Seven Networks, Inc.||Cross-platform event engine|
|US8316098||Nov 20, 2012||Seven Networks Inc.||Social caching for device resource sharing and management|
|US8356080||Jan 15, 2013||Seven Networks, Inc.||System and method for a mobile device to use physical storage of another device for caching|
|US8359587||May 1, 2008||Jan 22, 2013||Oracle America, Inc.||Runtime profitability control for speculative automatic parallelization|
|US8528001||Dec 15, 2008||Sep 3, 2013||Oracle America, Inc.||Controlling and dynamically varying automatic parallelization|
|US8549587||Feb 14, 2012||Oct 1, 2013||Seven Networks, Inc.||Secure end-to-end transport through intermediary nodes|
|US8561046||Sep 14, 2009||Oct 15, 2013||Oracle America, Inc.||Pipelined parallelization with localized self-helper threading|
|US8561086||May 17, 2012||Oct 15, 2013||Seven Networks, Inc.||System and method for executing commands that are non-native to the native environment of a mobile device|
|US8612929||Dec 10, 2008||Dec 17, 2013||Oracle America, Inc.||Compiler implementation of lock/unlock using hardware transactional memory|
|US8677337||May 1, 2008||Mar 18, 2014||Oracle America, Inc.||Static profitability control for speculative automatic parallelization|
|US8739141||May 19, 2008||May 27, 2014||Oracle America, Inc.||Parallelizing non-countable loops with hardware transactional memory|
|US8811952||May 5, 2011||Aug 19, 2014||Seven Networks, Inc.||Mobile device power management in data synchronization over a mobile network with or without a trigger notification|
|US8831561||Apr 28, 2011||Sep 9, 2014||Seven Networks, Inc||System and method for tracking billing events in a mobile wireless network for a network operator|
|US8868753||Dec 6, 2012||Oct 21, 2014||Seven Networks, Inc.||System of redundantly clustered machines to provide failover mechanisms for mobile traffic management and network resource conservation|
|US8874761||Mar 15, 2013||Oct 28, 2014||Seven Networks, Inc.||Signaling optimization in a wireless network for traffic utilizing proprietary and non-proprietary protocols|
|US8977755||Dec 6, 2012||Mar 10, 2015||Seven Networks, Inc.||Mobile device and method to utilize the failover mechanism for fault tolerance provided for mobile traffic management and network/device resource conservation|
|US9002828||Jan 2, 2009||Apr 7, 2015||Seven Networks, Inc.||Predictive content delivery|
|US9009692||Dec 26, 2009||Apr 14, 2015||Oracle America, Inc.||Minimizing register spills by using register moves|
|US9043433||May 25, 2011||May 26, 2015||Seven Networks, Inc.||Mobile network traffic coordination across multiple applications|
|US9043731||Mar 30, 2011||May 26, 2015||Seven Networks, Inc.||3D mobile user interface with configurable workspace management|
|US9047142||Dec 16, 2010||Jun 2, 2015||Seven Networks, Inc.||Intelligent rendering of information in a limited display environment|
|US9049179||Jan 20, 2012||Jun 2, 2015||Seven Networks, Inc.||Mobile network traffic coordination across multiple applications|
|US9055102||Aug 2, 2010||Jun 9, 2015||Seven Networks, Inc.||Location-based operations and messaging|
|US9060032||May 9, 2012||Jun 16, 2015||Seven Networks, Inc.||Selective data compression by a distributed traffic management system to reduce mobile data traffic and signaling traffic|
|US9065765||Oct 8, 2013||Jun 23, 2015||Seven Networks, Inc.||Proxy server associated with a mobile carrier for enhancing mobile traffic management in a mobile network|
|US9077630||Jul 8, 2011||Jul 7, 2015||Seven Networks, Inc.||Distributed implementation of dynamic wireless traffic policy|
|US9084105||Apr 19, 2012||Jul 14, 2015||Seven Networks, Inc.||Device resources sharing for network resource conservation|
|US9100873||Sep 14, 2012||Aug 4, 2015||Seven Networks, Inc.||Mobile network background traffic data management|
|U.S. Classification||717/151, 711/E12.067|
|Cooperative Classification||G06F2212/6012, G06F12/1081, Y02B60/1225, G06F9/45504, G06F12/0802, G06F9/30174|
|European Classification||G06F9/30U2, G06F12/10P|
|Jul 26, 2005||AS||Assignment|
Owner name: TEXAS INSTRUMENTS INCORPORATED, TEXAS
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CABILLIC, GILBERT;PELTIER, MIKAEL;LESOT, JEAN-PHILIPPE;REEL/FRAME:016821/0389;SIGNING DATES FROM 20050718 TO 20050725