Process and system for Java virtual method invocation

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

C717S140000, C717S151000, C717S158000, C717S157000, C714S035000, C709S241000

Reexamination Certificate

active

06507946

ABSTRACT:

TECHNICAL FIELD
The present invention relates generally to an improved data processing system and, in particular, to a process and system for improved execution performance in a Java virtual machine.
DESCRIPTION OF RELATED ART
Since Java is an interpreted language, any programs written in Java, after being converted into Java class files, are interpreted by a Java virtual machine (JVM). In order to improve performance, many JVMs may compile Java classes into platform-specific binary code after they are loaded into the JVM. Then, instead of being interpreted, Java classes are executed in their compiled native code format, similar to programs written in other languages, such as C, C++, etc. Such just-in-time (JIT) compilation of Java programs can significantly improve the speed of execution of Java programs.
A high performance JIT compiler is the key to a high performance Java implementation, and one of the most important actions of a high performance JIT compiler is optimizing method invocation. Because Java is an object-oriented language, methods and method invocation are prevalent in typical Java programs. In Java, there are three kinds of method invocations: (1) static method invocation, also known as class method invocation; (2) interface method invocation; and (3) instance method invocation. An instance invocation can be a non-virtual method invocation (only for private methods and object instance initialization methods) or a virtual method invocation. While static method invocations and non-virtual instance method invocations are easier to optimize due to their static nature, interface method invocations and virtual instance method invocations are the most prevalent in Java. Therefore, improving virtual and interface method invocation is very important for the overall performance of a JIT compiler.
In Java, a virtual method can be declared final. A final method can not be overridden by any subclass, which prevents malicious modification of trusted and verified code and ensures consistency. Hence, invocations of final methods can be more easily optimized by the JIT compiler than those of regular virtual methods.
An important technique of method invocation optimization is called inlining. A method is inlined if its code is compiled into the calling method's context. Both static and non-virtual methods can be inlined. Final virtual methods, typically though not always, can be inlined. However, a disadvantage is that regular virtual methods cannot be directly inlined.
Inlining has important benefits. It dramatically reduces the frequency of method invocations, which saves the time needed to perform those method invocations. More importantly, inlining is synergistic with other code optimizations because it makes those optimizations more effective. Inlining produces much larger blocks of code for the optimizer to work on. This provides a situation that significantly increases the effectiveness of traditional compiler optimizations, thus overcoming a major obstacle to increased Java programming language performance.
Therefore, in order to improve the performance of certain Java programs, it would be advantageous to provide a JIT compiler with the ability to improve the performance of a program by improving the manner in which its methods are invoked. It would be particularly advantageous to provide a consistent process by which the invocation of virtual methods may be optimized.
SUMMARY OF THE INVENTION
The present invention provides a process and system for optimizing an invocation of a method. A determination is made to compile a calling method, and a call to a callee method is detected within the first method. The callee method may be a non-final, virtual method, and a determination may be made that the callee method has not been previously overridden. The callee method is then inlined within the first method. In addition, no conditional statements are inserted into the calling method along with the inlined method. The determination to compile and optimize these methods may be made by a just-in-time compiler, and if the methods are Java methods, then a Java just-in-time compiler performs the optimization process. If a determination is made to load a class that contains a method that overrides the callee method, then the calling method is recompiled or patched.


REFERENCES:
patent: 4989132 (1991-01-01), Mellender et al.
patent: 5230050 (1993-07-01), Iitsuka et al.
patent: 5613120 (1997-03-01), Palay et al.
patent: 5950003 (1999-09-01), Kaneshiro et al.
patent: 5970249 (1999-10-01), Holzle et al.
patent: 6026485 (2000-02-01), O'Connor et al.
patent: 6041179 (2000-03-01), Bacon et al.
patent: 6072951 (2000-06-01), Donovan et al.
patent: 6101326 (2000-08-01), Mattson, Jr.
patent: 6161217 (2000-12-01), Detlefs et al.
patent: 6195793 (2001-02-01), Schmidt
patent: 6199201 (2001-03-01), Lamping et al.
patent: 6223340 (2001-04-01), Detlefs
patent: 6237141 (2001-05-01), Holzle et al.
patent: 6401137 (2002-06-01), Wolczko et al.
Title: Efficient Dynamic Dispatch without Virtual Function Tables. The SmallEiffel Compiler, author: Zendra et al, ACM, 1997.*
Title: Debugging Optimized Code with Dynamic Deoptimization, author: Holzle et al, ACM, 1992.*
Titlel The Jalapeno Dynamic Optimizing Compiler for Java TM, author: Burke et al, ACM, Jun. 1999.

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

Process and system for Java virtual method invocation does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Process and system for Java virtual method invocation, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Process and system for Java virtual method invocation will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3033305

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