System and method for dynamically optimizing executing...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06820258

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates generally to computer program execution systems, e.g., optimizing compilers, and more specifically, to a system and method for dynamically optimizing running programs to result in specialized code tailored and optimized to a specific execution of the program for improved performance.
2. Discussion of the Prior Art
Some modern programming languages (e.g., Java) support dynamic loading of the application program at run-time. Since the program code is not available until run-time, language implementations and virtual machines dynamically optimize or Just-In-Time compile the program as it runs. One problem of this approach arises when trying to dynamically optimize a program while it runs. After generating the optimized code, the system must somehow translate the state of the running program into a form that allows execution to continue in the optimized code. This translation raises engineering problems for the optimizing compiler; all optimizations and phases of the compiler must account for potential transition, complicating the compiler implementation and potentially inhibiting some optimizations.
As defined herein, an activation is a single execution of a code sequence, such as a procedure or method in a running program. An activation is a dynamic entity; for example, as a program calls and returns from procedures or methods, it creates and destroys activations. An activation may refer to execution of a code sequence in either an interpreted or compiled context. An activation is associated with a program state, which comprises current values of memory locations, variable values, and execution context of the executing code sequence of the activation. The particular instantiation of program state depends on the implementation of the run-time system that executes the code sequence of the activation. For example, in a Java virtual machine, the program state may consist of the values of variables and stack locations in the virtual machine specification, along with a bytecode index identifying the current program counter. Alternatively, an interpreter may define program state in terms of memory locations and variable values used in the internal interpreter implementation. A dynamic binary translation system might use an intermediate representation close to the binary interface for the machine target.
For example, consider an activation representing the execution of a sequence of Java bytecodes. The program state for an activation is a triple <PC, S, L>: with PC representing the program counter; i.e., the offset of the currently executing bytecode; with S holding the values of the stack, a set of abstract memory locations as defined by the Java Virtual Machine Specification; and, with L holding the values of the local variables, named abstract memory locations as defined by the Java Virtual Machine Specification.
Previous systems such as the Self-93 system and the IBM Mixed-Mode Interpreter JIT support dynamic optimization of procedure activations. However, these systems rely on a method whereby the optimizing compiler generates code for the original source code, and provides extensive mapping information to translate program state into the machine state for the optimized code. These approaches furthermore require tremendous engineering effort into building the optimizing compiler in order to support transition to optimized code at various program points, and, particularly, to enable the optimizing compiler to keep careful track of mappings from original program state to the state of the optimized code.
It would thus be highly desirable to provide an optimizing compiler that may efficiently generate a specialized optimization of a program without the need for modifying the optimizing compiler.
SUMMARY OF THE INVENTION
It is an object of the present invention to provide a system for dynamically optimizing running code by generating specialized code tailored and optimized to a specific execution of the program while preserving semantics of original program code.
It is a further object of the present invention to provide a system for dynamically optimizing running code before or during run time.
It is another object of the present invention to provide an apparatus for efficiently generating a specialized optimization of a program without the need for modifying the optimizing compiler.
It is another object of the present invention to provide a system for dynamically optimizing running code by generating specialized code tailored and optimized to a specific execution and including a prologue of instructions for providing program state.
According to the invention, there is provided a system and method for dynamically optimizing a code sequence of a program while executing in a computer system, the method comprising: a) inserting one or more program yield points at which an unoptimized original code sequence may be optimized in the executing program; b) generating a prologue of instructions for setting up program state associated with the unoptimized original code sequence; c) adding the prologue of instructions to an intermediate representation of the original code sequence code for generating a specialized code sequence; and, d) compiling the specialized code sequence with an optimizing compiler for generating a run-time representation of the specialized code sequence, the run-time representation being further optimized for execution on a target computer system.
Advantageously, such a system and method for preserving semantics of original program code by addition of the specialized continuation exploits run-time state to generate better code for improving performance for longer running procedure activations.


REFERENCES:
patent: 5539907 (1996-07-01), Srivastava et al.
patent: 5675803 (1997-10-01), Preisler et al.
patent: 5911073 (1999-06-01), Mattson et al.
patent: 6088525 (2000-07-01), Peri
patent: 6164841 (2000-12-01), Mattson et al.
patent: 6189141 (2001-02-01), Benitez et al.
patent: 6223339 (2001-04-01), Shah et al.
patent: 6314558 (2001-11-01), Angel et al.
patent: 6481008 (2002-11-01), Chaiken et al.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

System and method for dynamically optimizing executing... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with System and method for dynamically optimizing executing..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System and method for dynamically optimizing executing... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3323479

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.