The Java Bytecode language lacks expressiveness for traditional compiler optimizations, making this portable, secure software distribution format inefficient as a program representation for high performance. This inefficiency results from the underlying stack model, as well as the fact that many bytecode operations intrinsically include sub-operations (e.g., iaXoad includes the address computation, a,rray 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 bytecodes have no mechanism to indicate which sub-operations in the bytecode stream are redundant or subsumed by previous ones. As a consequence, the Java Bytecode language inhibits the expression of important compiler optimizations, including common sub-expression elimination, register allocation and instruction scheduling.The bytecode stream generated by the Java frontend is a significantly under-optimized program representation. The most common solution to overcome this aspect of the language is the use of a Just-in-Time (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 the Java front-end. These annotations carry information concerning compiler optimization. During the translation process, an annotationaware JIT (AJIT) system then uses this information to produce high-performance native code without per-*This work supported K part by CAPES.Permission to make digital or hard copies of all or part ofthis work fix personal or classroom use is granted without fee provided that topics are not made or distributed for profit or commercial advantage and that copies hear this notice and the full citation on the tirst page. To copy otherwise, to republish, to post on servers or to redistribute to lists. requires prior specific permission and/or a fee. JAVA'99 San Francisco California USA Copyright ACM 1999 I-581 13-161-5/99/06...$5.00 forming much of the necessary analyses or transformations. We describe the implementation of the first prototype of our annotation-aware JIT system and show performance results comparing our system with other Java Virtual Machines (JVMs) running on SPARC architecture.
SUMMARYThe efficient execution of Java programs presents a challenge to hardware and software designers alike. The difficulty, however, lies with the Java bytecodes. Their model of a simplistic, platform-independent stack machine is well-suited for portability, though at the expense of execution speed. Various approaches are being proposed to increase the speed of Java bytecode programs, including: (i) on-the-fly compilation to native code (also known as JIT or 'just-in-time' compilation); (ii) traditional ('ahead-of-time') compilation of bytecodes to some higher-level intermediate form and then to native code; and (iii) translation of bytecodes to a higher-level language and then use of an existing compiler to produce native code. Speedups of the order of 50 over standard bytecode interpretation have been claimed.All of these approaches rely upon bytecode analysis (of varying sophistication) to extract information about the program, which is then used to optimize the native code during the translation process. However, extracting information from a lower-level representation such as the Java bytecodes can be very expensive. Also, given the fact that most approaches for executing Java bytecodes cannot spend a great deal of time recovering high-level information, the solutions adopted during the translation process must use faster and less accurate analysis techniques, thus penalizing the quality of the native code.In this paper we propose an optimization approach based on bytecode annotations. The bytecodes are annotated during the original source code to bytecode translation, allowing both traditional interpretation by a JVM and aggressive optimization by an annotation-aware bytecode compiler. Annotations hinder neither portability nor compatibility, while preserving optimization information that is expensive to recompute. Preliminary results yield bytecode with C-like performance using JIT technology.
The ecient execution of Java programs present s a c hallenge to hardware and software designers alike.The diculty h o wever lies with the Java b ytecodes. Their model of a simplistic, platform-independent stack machine is well-suited for portability, though at the expense of execution speed. Various approaches are being proposed to increase the speed of Java b ytecode programs, including: (1) on-the-y compilation to native code (also known as JIT or \just-in-time" compilation); ( 2) traditional (\ahead-of-time") compilation of bytecodes to some higher-level intermediate form and then to native code; and (3) translation of bytecodes to a higher-level language and then use of an existing compiler to produce native c o d e .Speedups on the order of 50 over standard bytecode interpretation have been claimed.All of these approaches rely upon bytecode analysis (of varying sophistication) to extract information
SUMMARYThe Java bytecode language lacks expressiveness for traditional compiler optimizations, making this portable, secure software distribution format inefficient as a program representation for high performance. This inefficiency 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 re-use of values and bytecode re-ordering. 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 significantly under-optimized program representation. The most common solution to overcome this inefficiency is the use of a just-in-time (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.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.