OpenJIT: An Open-Ended, Reflective JIT Compiler Framework for Java

OpenJIT is an open-ended, reflective JIT compiler framework for Java being researched and developed in a joint project by Tokyo Inst. Tech. and Fujitsu Ltd. Although in general self-descriptive systems have been studied in various contexts such as reflection and interpreter/compiler bootstrapping, OpenJIT is a first system we know to date that offers a stable, full-fledged Java JIT compiler that plugs into existing monolithic JVMs, and offer competitive performance to JITs typically written in C or C++. This is in contrast to previous work where compilation did not occur in the execution phase, customized VMs being developed ground-up, performance not competing with existing optimizing JIT compilers, and/or only a subset of the Java language being supported. The main contributions of this paper are, 1) we propose an architecture for a reflective JIT compiler on a monolithic VM, and identify the technical challenges as well as the techniques employed, 2) We define an API that adds to the existing JIT compiler APIs in "classic" JVM to allow reflective JITs to be constructed, 3) We show detailed benchmarks of run-time behavior of OpenJIT to demonstrate that, while being competitive with existing JITs the time- and space-overheads of compiler metaobjects that exist in the heap are small and manageable. Being an object-oriented compiler framework, OpenJIT can be configured to be small and portable or fully-fledged optimizing compiler framework in the spirit of SUIF. It is fully JCK compliant, and runs all large Java applications we have tested to date including HotJava. We are currently distributing OpenJIT for free to foster further research into advanced compiler optimization, compile-time reflection, advanced run-time support for languages, as well as other areas such as embedded computing, metacomputing, and ubiquitous computing.

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

[2]  Urs Hölzle,et al.  A Study of the Allocation Behavior of the SPECjvm98 Java Benchmark , 1999, ECOOP.

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

[4]  Shigeru Chiba Javassist - A Reflection-based Programming Wizard for Java , 1998 .

[5]  Yves Roudier,et al.  The Extensible Java Preprocessor Kit and a Tiny Data-Parallel Java , 1997, ISCOPE.

[6]  Ian Piumarta,et al.  Optimizing direct threaded code by selective inlining , 1998, PLDI 1998.

[7]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[8]  Malcolm P. Atkinson,et al.  An orthogonally persistent Java , 1996, SGMD.

[9]  Satoshi Matsuoka,et al.  OMPC++ - A Portable High-Performance Implementation of DSM using OpenC++ Reflection , 1999, Reflection.

[10]  Michael Factor,et al.  cJVM: a single system image of a JVM on a cluster , 1999, Proceedings of the 1999 International Conference on Parallel Processing.

[11]  Satoshi Matsuoka,et al.  OpenJIT—A Reflective Java JIT Compiler , 2000 .

[12]  David E. Culler,et al.  Jaguar: enabling efficient communication and I/O in Java , 2000, Concurr. Pract. Exp..

[13]  Crispin Cowan,et al.  Declarative specialization of object-oriented programs , 1997, OOPSLA '97.

[14]  Nobuhisa Fujinami Automatic Run-Time Code Generation in Object-Oriented Languages , 1997, PLILP.

[15]  Ole Agesen Design and Implementation of Pep, A Java Just-in-Time Translator , 1997, Theory Pract. Object Syst..

[16]  Bowen Alpern,et al.  Implementing jalapeño in Java , 1999, OOPSLA '99.

[17]  Satoshi Matsuoka,et al.  OpenJIT Frontend System: An Implementation of the Reflective JIT Compiler Frontend , 1999, Reflection and Software Engineering.

[18]  Shigeru Chiba,et al.  A metaobject protocol for C++ , 1995, OOPSLA.

[19]  Dawson R. Engler,et al.  VCODE: a retargetable, extensible, very fast dynamic code generation system , 1996, PLDI '96.

[20]  John Maloney,et al.  Back to the Future The Story of Squeak, A Practical Smalltalk Written in Itself , 1997 .

[21]  John Maloney,et al.  Back to the Future: The Story of Squeak - A Usable Smalltalk Written in Itself , 1997, Conference on Object-Oriented Programming Systems, Languages, and Applications.

[22]  Ulrik Pagh Schultz,et al.  Towards Automatic Specialization of Java Programs , 1999, ECOOP.

[23]  Michiaki Tatsubori,et al.  Programming Support of Design Patterns with Compile-time Reflection , 2000 .

[24]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[25]  David E. Culler,et al.  Jaguar: enabling efficient communication and I/O in Java , 2000 .

[26]  Kouya Shimura,et al.  Experimental Development of Java JIT Compiler , 1996 .

[27]  Satoshi Matsuoka,et al.  Compiling away the meta-level in object-oriented concurrent reflective languages using partial evaluation , 1995, OOPSLA.

[28]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[29]  Akinori Yonezawa,et al.  Design and Partial Evaluation of Meta-Objects for a Concurrent Reflective Language , 1998, ECOOP.

[30]  Francesco Tisato,et al.  Reflection and Software Engineering , 2001, Lecture Notes in Computer Science.

[31]  Ian Welch,et al.  From Dalang to Kava - The Evolution of a Reflective Java Extension , 1999, Reflection.

[32]  John L. Bruno,et al.  jContractor: A Reflective Java Library to Support Design by Contract , 1999, Reflection.