Design, implementation, and evaluation of optimizations in a JavaTM Just-In-Time compiler

The Java language incurs a runtime overhead for exception checks and object accesses, which are executed without an interior pointer in order to ensure safety. It also requires type inclusion test, dynamic class loading, and dynamic method calls in order to ensure flexibility. A ‘Just-In-Time’ (JIT) compiler generates native code from Java byte code at runtime. It must improve the runtime performance without compromising the safety and flexibility of the Java language. We designed and implemented effective optimizations for a JIT compiler, such as exception check elimination, common subexpression elimination, simple type inclusion test, method inlining, and devirtualization of dynamic method call. We evaluate the performance benefits of these optimizations based on various statistics collected using SPECjvm98, its candidates, and two JavaSoft applications with byte code sizes ranging from 23 000 to 280 000 bytes. Each optimization contributes to an improvement in the performance of the programs. Copyright © 2000 John Wiley & Sons, Ltd.

[1]  David F. Bacon,et al.  Fast and effective optimization of statically typed object-oriented languages , 1997 .

[2]  Craig Chambers,et al.  Debugging optimized code with dynamic deoptimization , 1992, PLDI '92.

[3]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[4]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

[5]  Michael Wolfe,et al.  Elimination of redundant array subscript range checks , 1995, PLDI '95.

[6]  R. Nigel Horspool,et al.  Efficient type inclusion tests , 1997, OOPSLA '97.

[7]  John C. Gyllenhaal,et al.  Java bytecode to native code translation: the Caffeine prototype and preliminary results , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[8]  Etienne Morel,et al.  Global optimization by suppression of partial redundancies , 1979, CACM.

[9]  Ali-Reza Adl-Tabatabai,et al.  Fast, effective code generation in a just-in-time Java compiler , 1998, PLDI.

[10]  Rajiv Gupta,et al.  Optimizing array bound checks using flow analysis , 1993, LOPL.

[11]  John L. Hennessy,et al.  The priority-based coloring approach to register allocation , 1990, TOPL.

[12]  Bernhard Steffen,et al.  Lazy code motion , 1992, PLDI '92.

[13]  Urs Hölzle,et al.  Eliminating Virtual Function Calls in C++ Programs , 1996, ECOOP.

[14]  GoslingJames Java intermediate bytecodes , 1995 .

[15]  Norman H. Cohen Type-extension type test can be performed in constant time , 1991, TOPL.

[16]  David Grove,et al.  Profile-guided receiver class prediction , 1995, OOPSLA.

[17]  Craig Chambers,et al.  Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches , 1991, ECOOP.

[18]  David Detlefs,et al.  Inlining of Virtual Methods , 1999, ECOOP.