An annotation-aware Java virtual machine implementation

The Java bytecode language lacks expressiveness for traditional compiler optimizations, making this portable, secure software distribution format ine cient as a program representation for high performance. This ine ciency results from the underlying stack model, as well as the fact that many bytecode operations intrinsically include sub-operations (e.g., iaload includes the address computation, array bounds checks and the actual load of the array element). The stack model, with no operand registers and limiting access to the top of the stack, prevents the reuse of values and bytecode reordering. In addition, the language has no mechanism to indicate which sub-operations in the Java bytecode stream are redundant or subsumed by previous ones. As a consequence, the Java bytecode language inhibits the expression of important compiler optimizations, including register allocation and instruction scheduling. The Java bytecode stream generated by a Java bytecode compiler is a signi cantly under-optimized program representation. The most common solution to overcome this ine ciency is the use of a Just-inTime (JIT) compiler to not only generate native code, but perform optimization as well. However, the latter is a time consuming operation in an already time-constrained translation process. In this paper we present an alternative to an optimizing JIT compiler that makes use of code annotations generated by a Java bytecode compiler. These annotations carry information concerning compiler optimizations. During the translation process, an annotation-aware Java Virtual Machine (JVM) system then uses this information to produce high performance native code without performing much of the necessary analyses or transformations. We describe the implementation of a prototype of an annotation-aware JVM consisting of an annotation-aware JIT compilation system. We conclude the paper showing performance results comparing our system with other JVMs running on SPARC architecture.

[1]  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).

[2]  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.

[3]  Thomas Kistler Dynamic Runtime Optimization , 1997, JMLC.

[4]  Alexandru Nicolau,et al.  Annotating the Java Bytecodes in Support of Optimization , 1997, Concurr. Pract. Exp..

[5]  Andrea C. Arpaci-Dusseau,et al.  Parallel programming in Split-C , 1993, Supercomputing '93. Proceedings.

[6]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[7]  Troy Downing,et al.  Java Virtual Machine , 1997 .

[8]  Lars Ræder Clausen A Java Bytecode Optimizer Using Side-Effect Analysis , 1997, Concurr. Pract. Exp..

[9]  George C. Necula,et al.  The design and implementation of a certifying compiler , 1998, PLDI.

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

[11]  Frank Tip,et al.  Practical experience with an application extractor for Java , 1999, OOPSLA '99.

[12]  Alexandru Nicolau,et al.  Adaptive Bitonic Sorting: An Optimal Parallel Algorithm for Shared-Memory Machines , 1989, SIAM J. Comput..

[13]  Michael Franz,et al.  Slim binaries , 1997, CACM.

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

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

[16]  Michael D. Smith,et al.  Quality and speed in linear-scan register allocation , 1998, PLDI.

[17]  Wei Li,et al.  Optimizing Java bytecodes , 1997, Concurr. Pract. Exp..

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

[19]  Markus Mock,et al.  Annotation-Directed Run-Time Specialization in C , 1997, PEPM.

[20]  David W. Wall,et al.  Global register allocation at link time , 1986, SIGPLAN '86.

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