A dynamic optimization framework for a Java just-in-time compiler

The high performance implementation of Java Virtual Machines (JVM) and just-in-time (JIT) compilers is directed toward adaptive compilation optimizations on the basis of online runtime profile information. This paper describes the design and implementation of a dynamic optimization framework in a production-level Java JIT compiler. Our approach is to employ a mixed mode interpreter and a three level optimizing compiler, supporting quick, full, and special optimization, each of which has a different set of tradeoffs between compilation overhead and execution speed. a lightweight sampling profiler operates continuously during the entire program's exectuion. When necessary, detailed information on runtime behavior is collected by dynmiacally generating instrumentation code which can be installed to and uninstalled from the specified recompilation target code. Value profiling with this instrumentation mechanism allows fully automatic code specialization to be performed on the basis of specific parameter values or global data at the highest optimization level. The experimental results show that our approach offers high performance and a low code expansion ratio in both program startup and steady state measurements in comparison to the compile-only approach, and that the code specialization can also contribute modest performance improvement

[1]  Cliff Click,et al.  The java hotspot TM server compiler , 2001 .

[2]  Toshio Nakatani,et al.  A study of exception handling and its dynamic optimization in Java , 2001, OOPSLA '01.

[3]  Toshiaki Yasue,et al.  Overview of the IBM Java Just-in-Time Compiler , 2000, IBM Syst. J..

[4]  Urs Hölzle,et al.  Adaptive optimization for self: reconciling high performance with exploratory programming , 1994 .

[5]  Ron Cytron,et al.  Does “just in time” = “better late than never”? , 1997, POPL '97.

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

[7]  Charles Consel,et al.  Efficient incremental run-time specialization for free , 1999, PLDI '99.

[8]  Brad Calder,et al.  Value profiling , 1997, Proceedings of 30th Annual International Symposium on Microarchitecture.

[9]  John Whaley,et al.  Dynamic Optimization through the use of Automatic Runtime Specialization , 1999 .

[10]  Cliff Click,et al.  The Java HotSpot Server Compiler , 2001, Java Virtual Machine Research and Technology Symposium.

[11]  Andreas Krall,et al.  Efficient JavaVM just-in-time compilation , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

[12]  John Whaley,et al.  A portable sampling-based profiler for Java virtual machines , 2000, JAVA '00.

[13]  James M. Stichnoth,et al.  Practicing JUDO: Java under dynamic optimizations , 2000, PLDI '00.

[14]  R. Kent Dybvig,et al.  An infrastructure for profile-driven dynamic recompilation , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

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

[16]  Craig Chambers,et al.  Towards better inlining decisions using inlining trials , 1994, LFP '94.

[17]  Matthew Arnold,et al.  Adaptive Optimization in the Jalapeo JVM: The Controller's Analytical Model , 2000 .

[18]  Urs Hölzle,et al.  Reconciling responsiveness with performance in pure object-oriented languages , 1996, TOPL.

[19]  Markus Mock,et al.  A retrospective on: "an evaluation of staged run-time optimizations in DyC" , 2004, SIGP.

[20]  Erik R. Altman,et al.  LaTTe: a Java VM just-in-time compiler with fast and efficient register allocation , 1999, 1999 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.PR00425).

[21]  Toshiaki Yasue,et al.  A study of devirtualization techniques for a Java Just-In-Time compiler , 2000, OOPSLA '00.

[22]  Toshiaki Yasue,et al.  Design, implementation, and evaluation of optimizations in a just-in-time compiler , 1999, JAVA '99.

[23]  Charles Consel,et al.  A general approach for run-time specialization and its application to C , 1996, POPL '96.

[24]  Brian N. Bershad,et al.  Fast, effective dynamic compilation , 1996, PLDI '96.

[25]  Matthew Arnold,et al.  A framework for reducing the cost of instrumented code , 2001, PLDI '01.

[26]  David Grove,et al.  Selective specialization for object-oriented languages , 1995, PLDI '95.

[27]  Jong-Deok Choi,et al.  A framework for interprocedural optimization in the presence of dynamic class loading , 2000, PLDI '00.

[28]  Toshio Nakatani,et al.  Effective null pointer check elimination utilizing hardware trap , 2000, SIGP.

[29]  Dawson R. Engler,et al.  tcc: a system for fast, flexible, and high-level dynamic code generation , 1997, PLDI '97.

[30]  Michael D. Smith,et al.  Overcoming the Challenges to Feedback-Directed Optimization , 2000, Dynamo.

[31]  Michael D. Smith,et al.  Ephemeral Instrumentation for Lightweight Program Profiling , 1997 .

[32]  Michael Wolfe,et al.  Initial Results for Glacial Variable Analysis , 1996, LCPC.

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