skip to main content
10.1145/605397.605404acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
Article

Bytecode fetch optimization for a Java interpreter

Authors Info & Claims
Published:01 October 2002Publication History

ABSTRACT

Interpreters play an important role in many languages, and their performance is critical particularly for the popular language Java. The performance of the interpreter is important even for high-performance virtual machines that employ just-in-time compiler technology, because there are advantages in delaying the start of compilation and in reducing the number of the target methods to be compiled. Many techniques have been proposed to improve the performance of various interpreters, but none of them has fully addressed the issues of minimizing redundant memory accesses and the overhead of indirect branches inherent to interpreters running on superscalar processors. These issues are especially serious for Java because each bytecode is typically one or a few bytes long and the execution routine for each bytecode is also short due to the low-level, stack-based semantics of Java bytecode. In this paper, we describe three novel techniques of our Java bytecode interpreter, write-through top-of-stack caching (WT), position-based handler customization (PHC), and position-based speculative decoding (PSD), which ameliorate these problems for the PowerPC processors. We show how each technique contributes to improving the overall performance of the interpreter for major Java benchmark programs on an IBM POWER3 processor. Among three, PHC is the most effective one. We also show that the main source of memory accesses is due to bytecode fetches and that PHC successfully eliminates the majority of them, while it keeps the instruction cache miss ratios small.

References

  1. Addendum to PowerPC 604 RISC Microprocessor User's Manual: PowerPC 604e Microprocessor Supplement and User's Manual Errata. Publication number: SA14-2056-00. 1996.]]Google ScholarGoogle Scholar
  2. J. R. Bell. Threaded Code. Communications of the ACM, Vol. 16(6), pp. 370-372. 1973.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. Debaere and J. Van Campenhout. Interpretation and Instruction Path Coprocessing. The MIT Press. 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. B. K. Dewar. Indirect Threaded Code. Communications of the ACM, Vol. 18(6), pp. 330-331. 1975.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. A. Ertl. Stack Caching for Interpreters. In Proceeding of SIGPLAN '95 Conference on Programming Language Design and Implementation (PLDI), pp. 315-327. 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Ertl. 'Threaded Code'. Available at 'http://www.complang.tuwien.ac.at/forth/threaded-code.html']]Google ScholarGoogle Scholar
  7. M. A. Ertl and D. Gregg. The Behavior of Efficient Virtual Machine Interpreters on Modern Architectures. Euro-Par 2001. LNCS 2150, pp. 403-412. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Gregg, M. A. Ertl, and A. Krall. Implementing an Efficient Java Interpreter. HPCN Europe 2001. LNCS 2110, pp. 613-620. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996. ISBN 0-201-63451-1.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Hoogerbrugge, L. Augusteijn, J. Trum, and R. Van de Wiel. A Code Compression System Based on Pipelined Interpreters. SOFTWARE -- Practice and Experience, Vol. 29(11), pp. 1005-1023. Sep. 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Hoogerbrugge and L. Augusteijn. Pipelined Java Virtual Machine Interpreters. CC/ETAPS 2000. LNCS 1781, pp. 35-49. Mar. 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. HPM Tool Kit. Available at 'http://www.alphaworks.ibm.com/tech/hpmtoolkit/']]Google ScholarGoogle Scholar
  13. IBM Developer Kit, Java Technology Edition. Available at 'http://www.ibm.com/java/']]Google ScholarGoogle Scholar
  14. Intel® IA-64 Architecture Software Developer's Manual, Volume 3: Instruction Set Reference, Revision 1.1. Document Number: 246319-002. July 2000. Also available at 'http://www.intel.com/']]Google ScholarGoogle Scholar
  15. K. Ishizaki, M. Kawahito, T. Yasue, M. Takeuchi, T. 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 the ACM 1999 Java Grande Conference. pp. 119-128. the ACM 1999 Java Grande Conference. pp. 119-128. June. 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Itanium™ Processor Microarchitecture Reference for Software Optimization. Document Number: 245473-001. Mar. 2000. Also available at 'http://www.intel.com/']]Google ScholarGoogle Scholar
  17. 'Java Grande Forum Benchmark Suite'. Available at 'http://www.epcc.ed.ac.uk/javagrande/']]Google ScholarGoogle Scholar
  18. T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1996. ISBN 0-201-63452-X.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. F. P. O'Connel and S. W. White. POWER3: The next generation of PowerPC processors. IBM Journal of Research and Development, Vol. 44(6), pp. 873-884. Nov. 2000.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Paleczny, C. Vick, 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. POWER3: Next Generation 64-bit PowerPC Processor Design. Oct. 1998. White paper available at 'http://www.ibm.com/servers/eserver/pseries/hardware/whitepapers/power3wp.html']]Google ScholarGoogle Scholar
  22. PowerPC 604 RISC Microprocessor User's Manual. IBM order number: SA14-2044-00. 1994.]]Google ScholarGoogle Scholar
  23. R. Radhakrishnan, N. Vijaykrishnan, L. K. John, A. Sivasubramaniam, J. Rubio, and J. Sabarinathan. Java Run-time Systems: Characterization and Architectural Implications. IEEE Transactions on Computers, Vol. 50(2), pp. 131-146. Feb. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. H. Romer, D. Lee, G. M. Voelker, A. Wolman, W. A. Wong, Jean-Loup Baer, B. N. Bershad, and H. M. Levy. The Structure and Performance of Interpreters. In Proceedings of the seventh international conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS VII), pp. 150-159. Oct. 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. RS/6000 Scientific and Technical Computing: POWER3 Introduction and Tuning Guide. Publication number: SG24-5155-00. 1998]]Google ScholarGoogle Scholar
  26. Standard Performance Evaluation Corporation. 'SPEC JVM98 Benchmarks', available at 'http://www.spec.org/osg/jvm98/' and SPECjbb-2000, available at 'http://www.spec.org/osg/jbb2000/']]Google ScholarGoogle Scholar
  27. T. Suganuma, T. Ogasawara, M. Takeuchi, T. Yasue, M. Kawahito, K. Ishizaki, H. Komatsu, and T. Nakatani. Overview of the IBM Java Just-in-Time compiler. IBM System Journal, Vol. 39(1), pp. 175-193. 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. Suganuma, T. Yasue, M. Kawahito, H. Komatsu, and T. Nakatani. A Dynamic Optimization Framework for a Java Just-In-Time Compiler. In Proceeding of Object-Oriented Programming, System Languages, and Application (OOPSLA '01), pp. 180-194. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Sun Microsystems. The Java HotSpot Virtual Machine Technical White Paper. 2001. Available at 'http://java.sun.com/products/hotspot/index.html']]Google ScholarGoogle Scholar
  30. The PowerPC Architecture: a specification for a new family of RISC processors. ISBN 1-55860-316-6. 1994.]]Google ScholarGoogle Scholar
  31. 'XML Parser for Java'. Available at 'http://www.alphaworks.ibm.com/tech/xml4j']]Google ScholarGoogle Scholar

Index Terms

  1. Bytecode fetch optimization for a Java interpreter

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ASPLOS X: Proceedings of the 10th international conference on Architectural support for programming languages and operating systems
      October 2002
      318 pages
      ISBN:1581135742
      DOI:10.1145/605397
      • cover image ACM SIGARCH Computer Architecture News
        ACM SIGARCH Computer Architecture News  Volume 30, Issue 5
        Special Issue: Proceedings of the 10th annual conference on Architectural Support for Programming Languages and Operating Systems
        December 2002
        296 pages
        ISSN:0163-5964
        DOI:10.1145/635506
        Issue’s Table of Contents
      • cover image ACM SIGOPS Operating Systems Review
        ACM SIGOPS Operating Systems Review  Volume 36, Issue 5
        December 2002
        296 pages
        ISSN:0163-5980
        DOI:10.1145/635508
        Issue’s Table of Contents
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 37, Issue 10
        October 2002
        296 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/605432
        Issue’s Table of Contents

      Copyright © 2002 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 October 2002

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      ASPLOS X Paper Acceptance Rate24of175submissions,14%Overall Acceptance Rate535of2,713submissions,20%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader