ABSTRACT
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.A.R. Adl-Tabatabai, M. Ciemiak, C.Y. Lueh, V.M. Parikh, and J.M. Stichnoth. Fast, Effective Code Generation in a Just-in- Time Java Compiler. In Proceedings of the ACM SIGPLAN '98 Conference on Programming Language Design and Implementation, pp. 280-290, Jun. 1998.]] Google ScholarDigital Library
- 2.O. Agesen and D. Detlefs. Mixed-mode Byteeode Execution. Technical Report SMLI TR-2000-87, Sun Microsystems, 2000.]] Google ScholarDigital Library
- 3.M. Arnold, S. Fink, D. Grove, M. Hind, and P.F. Sweeney. Adaptive Optimizations in the Jalapefio JVM. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications, OOPSLA '00, Oct. 2000.]] Google ScholarDigital Library
- 4.M. Arnold, S. Fink, D. Grove, M. Hind, and P.F. Sweeney. Adaptive Optimizations in the Jalapefio JVM: The Controller's Analytical Model. In Proceedings of the ACM SIGPLAN Workshop on Feedback-Directed and Dynamic Optimization, FDDO-3, Dec. 2000.]] Google ScholarDigital Library
- 5.M. Arnold, B.G. Ryder. A Framework for Reducing the Cost of Instrumented Code. In Proceedings of the A CM SIGPLAN '01 Conference on Program Language Design and Implementation, pp. 168-179, Jun. 2001.]] Google ScholarDigital Library
- 6.J. Auslander, M. Philipose, C. Chambers, S.J. Eggers, and B.N. Bershad. Fast, Effective Dynamic Compilation. In Proceedings of the ACM SIGPLAN '96 Conference on Programming Language Design andlmplementation, pp. 149-158, May 1996.]] Google ScholarDigital Library
- 7.T. Autrey and M. Wolfe. Initial Results for Glacial Variable Analysis. In Proceedings of the 9th International Workshop on Languages and Compilers for Parallel Computing, Aug. 1996.]] Google ScholarDigital Library
- 8.V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A Transparent Dynamic Optimization System. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design andlmplementation, pp. 1-12, Jun. 2000.]] Google ScholarDigital Library
- 9.R.G. Burger and R.K. Dybvig. An infrastructure for Profile- Driven Dynamic Recompilation, In ICCL '98, the IEEE Computer Society International Conference on Computer Languages, May 1998.]] Google ScholarDigital Library
- 10.M.G. Burke, J.D. Choi, S. Fink, D. Grove, M. Hind, V. Sarkar, M. Serrano, V.C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapefio Dynamic Optimizing Compiler for Java, In Proceedings' of the ACM SIGPLAN Java Grande Conference, pp. 129- 141, Jun. 1999]] Google ScholarDigital Library
- 11.B. Calder, P. Feller, and A. Eustace. Value Profiling. In 30th International Conference on Microarchitecture, pp. 259-269, Dec. 1997.]] Google ScholarDigital Library
- 12.C. Chambers and D. Ungar. Customization: Optimizing Compiler Technology for SELF, a Dynamically-Typed Object- Oriented Programming Languages. In Proceedings of the A CM SIGPLAN '89 Conference on Programming Language Design andlmplementation, pp. 146-160, Jul. 1989.]] Google ScholarDigital Library
- 13.M. Ciemiak, G.Y. Lueh, and J.M. Stiehnoth. Practicing JUDO: Java Under Dynamic Optim/zations. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design andlmplementation, pp. 13-26, Jun. 2000.]] Google ScholarDigital Library
- 14.C. Consel and F. Noel. A General Approach for Run-Time Specialization and its Application to C. In Conference Record of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 145-156, Jan. 1996]] Google ScholarDigital Library
- 15.J. Dean, C. Chambers, and D. Grove. Selective Specialization for Object-Oriented Languages. In Proceedings of the ACM SIGPLAN '95 Conference on Programming Language Design andlmplementation, pp. 93-102, Jun. 1995.]] Google ScholarDigital Library
- 16.J. Dean and C. Chambers. Towards Better Inlining Decisions Using Inlining Trials. In Proceedings of the ACM SIGPLAN '94 Conference on LISP and Functional Programming, pp. 273-282, Jun. 1994.]] Google ScholarDigital Library
- 17.D. Detlefs and O. Agesen. Inlining of Virtual Methods. In the 13th European Conference on Object-Oriented Programming, 1999.]] Google ScholarDigital Library
- 18.J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996.]] Google ScholarDigital Library
- 19.B. Grant, M. Philipose, M. Mock, C. Chambers,and S.J. Eggers. An Evaluation of Staged Run-Time Optimizations in DyC. In Proceedings of the A CM SIGPLAN '99 Conference on Programming Language Design and Implementation, pp. 293- 304, May 1999.]] Google ScholarDigital Library
- 20.U. Holzle. Adaptive Optimization for SELF: Reconciling High Performance with Exploratory Programming. Ph.D. Thesis, Stanford University, CS-TR-94-1520, Aug. 1994.]] Google ScholarDigital Library
- 21.U, Holzle and D. Ungar. Reconciling responsiveness with performanee in pure object-oriented languages. ACM Transactions on Programming Languages and estems, 18(4):355-400, Jul. 1996.]] Google ScholarDigital Library
- 22.IBM Corporation Inc. "WebSphere Software Platform", documentation available at http://www.ibn~eom/websphere 2000.]]Google Scholar
- 23.K. Ishizaki, M. Kawahito, T. Yasue, M. Takeuehi, Y. Ogasawara, T. Suganuma, T. Onodera, H. Komatsu, and T. Nakatani. Design, Implementation, and Evaluation of Optimizations in a Just-In-Time Compiler. In Proceedings of ACM SIGPLAN Java Grande Conference, pp. 119-128, Jun. 1999.]] Google ScholarDigital Library
- 24.K. Ishizaki, M. Kawahito, T. Yasue, H. Komatsu, and T. Nakatani. A Study of Devirtualization Techniques for a Java Just-In- Time Compiler. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications, OOPSLA '00, pp. 294-310, Oct. 2000.]] Google ScholarDigital Library
- 25.Just System Corp. "IchitaroArk for Java", available at http://www.justsystem.corn/arldindex.html 1998.]]Google Scholar
- 26.M. Kawahito, H. Komatsu, and T. Nakatani. Effective Null Pointer Check Elimination Utilizing Hardware Trap. In Proceedings of the 9th International Conference on Architectural Support on Programming Languages and Operating Systems, Nov. 2000.]] Google ScholarDigital Library
- 27.A. Krall. Efficient JavaVM Just-in-Time Compilation. In Proceedings of International Conference on Parallel Architecture and Compilation Technique, Oct. 1998.]] Google ScholarDigital Library
- 28.R. Marlet, C. Consel, and P. Boinot. Efficient Incremental Run-Time Specialization for Free. In Proceedings of the ACM SIGPLAN '99 Conference on Programming Language Design and Implementation, pp. 281-292, Jun. 1999.]] Google ScholarDigital Library
- 29.T. Ogasawara, H. Komatsu, and T. Nakatani. A Study of Exception Handling and its Dynamic Optimization for Java. In Proceedings of the ACM SIGPLAN Conference on Object- Oriented Programming, Systems, Languages & Applications, OOPSLA '01, Oct. 2001.]] Google ScholarDigital Library
- 30.M. Paleezny, C. Viek, and C. Click. The Java HotSpot Server Compiler. In Proceedings of the Java Virtual Machine Research and Technology Symposium (JVM '01), pp. 1-12, Apr. 2001.]] Google ScholarDigital Library
- 31.M.P. Plezbert and R.K. Cytron. Does "Just in Time" = "Better Late than Never"?. In Conference Record of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 120-131, Jan. 1997.]] Google ScholarDigital Library
- 32.M. Poletto, D. Engler, and M.F. Kaashoek. tee: A System for Fast, Flexible, and High-Level Dynamic Code Generation. In Proceedings of the ACM SIGPLAN'97 Conference on Programming Language Design and Implementation, pp. 109-121, Jun. 1997.]] Google ScholarDigital Library
- 33.V.C. Sreedhar, M. Burke, and J.D. Choi. A Framework for In. terprocedural Optimization in the Presence of Dynamic Class Loading. In Proceedings of the ACM SIGPLAN '00 Conference of Program Language Design and Implementation, pp. 196-207, Jun. 2000.]] Google ScholarDigital Library
- 34.M.D. Smith. Overcoming the Challenges to Feedback-Directed Optimization. In Proceedings of the ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization (Dynamo '00), pp. 1-11, Jan. 2000.]] Google ScholarDigital Library
- 35.Standard Performance Evaluation Corporation. SPECjvm98 Benchmarks, available at http://www.spec.org/osg/jvrn98 and SPECjbb-2000 available at http://www.spec.org/osg/jbb2000.]]Google Scholar
- 36.T. Suganuma, T. Ogasawara, M. Takeuchi, T. Yasue, M. Kawahito, K. Ishizaki, H. Komatsd, and T. Nakatani. Overview of the IBM Java Just-in-Time Compiler, IBM Systems Journal, 39(1), 2000.]] Google ScholarDigital Library
- 37.Sun Microsysterus. The Java Hotspot Performance Engine Architecture. White paper available at http://java.sun.com/products/hotspot/index.html, May. 2001.]]Google Scholar
- 38.Sun Microsystems. Hot Java TM Browser available at http://java.sun.eorn/products/hotj ava/index.html 1997.]]Google Scholar
- 39.O. Traub, S. Schechter, and M.D. Smith. Ephemeral Instrumentation for Lightweight Program Profiling. Technical Report, Harvard University, 1999.]]Google Scholar
- 40.J. Whaley. A Portable Sampling-Based Profiler for Java Virtual Machines. In Proceedings of the ACM SIGPLAN Java Grande Conference, Jun. 2000.]] Google ScholarDigital Library
- 41.J. Whaley. Dynamic Optimization through the Use of Automatie Runtime Specialization. Master's thesis, Massachusetts Institute of Technology, May 1999.]]Google Scholar
- 42.Wind River Systems Inc. "IceStorm Browser 5", available at http://www.iceso ft.no/ieebrowser5/index.htm12000.]]Google Scholar
- 43.B.S. Yang, S.M. Moon, S. Park, J. Lee, S. Lee, J. Park, Y.C. Chung, S. Kim, K. Ebeioglu, and E. Altman. LaTTe: A Java VM Just-in-Time Compiler with Fast and Efficient Register Allocation. In Proceedings of International Conference on Parallel Architecture and Compilation Technique, Oct. 1999.]] Google ScholarDigital Library
Index Terms
- A dynamic optimization framework for a Java just-in-time compiler
Recommendations
Fast, effective code generation in a just-in-time Java compiler
PLDI '98: Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementationA "Just-In-Time" (JIT) Java compiler produces native code from Java byte code instructions during program execution. As such, compilation speed is more important in a Java JIT compiler than in a traditional compiler, requiring optimization algorithms to ...
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 ...
Design and evaluation of dynamic optimizations 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 employing a dynamic compilation system on the basis of online runtime profile information. The trade-off between the compilation ...
Comments