skip to main content
10.1145/858570.858575acmconferencesArticle/Chapter ViewAbstractPublication PagesivmeConference Proceedingsconference-collections
Article

The case for virtual register machines

Published:08 June 2003Publication History

ABSTRACT

Virtual machines (VMs) are a popular target for language implementers. Conventional wisdom tells us that virtual stack architectures can be implemented with an interpreter more efficiently, since the location of operands is implicit in the stack pointer. In contrast, the operands of register machine instructions must be specified explicitly. In this paper, we present a working system for translating stack-based Java virtual machine (JVM) code to a simple register code. We describe the translation process, the complicated parts of the JVM which make translation more difficult, and the optimisations needed to eliminate copy instructions. Experimental results show that a register format reduces the number of executed instructions by 34.88%, while increasing the number of bytecode loads by an average of 44.81%. Overall, this corresponds to an increase of 2.32 loads for each dispatch removed. We believe that the high cost of dispatches makes register machines attractive even at the cost of increased loads.

References

  1. M. Bull, L. Smith, M. Westhead, D. Henty, and R. Davey. Benchmarking Java Grande applications. In Second International Conference and Exhibition on the Practical Application of Java, Manchester, UK, April 2000.]]Google ScholarGoogle Scholar
  2. M. A. Ertl. Stack caching for interpreters. In SIGPLAN '95 Conference on Programming Language Design and Implementation, pages 315--327, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. A. Ertl and D. Gregg. The behaviour of efficient virtual machine interpreters on modern architectures. In Euro-Par 2001, pages 403--412. Springer LNCS 2150, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. A. Ertl, D. Gregg, A. Krall, and B. Paysan. vmgen --- A generator of efficient virtual machine interpreters. Software---Practice and Experience, 32(3):265--294, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. E. Gagnon. A Portable Research Framework for the Execution of Java Bytecode. PhD thesis, Mc Gill University, December 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Gagnon and L. Hendren. SableVM: A research framework for the efficient execution of Java bytecode. In First USENIX Java Virtual Machine Research and Technology Symposium, Monterey, California, April 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. Gagnon and L. Hendren. Effective inline-threaded interpretation of java bytecode using preparation sequences. In Proceedings of the 12th International Conference on Compiler Construction, LNCS 2622, pages 170--184, April 2003.]]Google ScholarGoogle ScholarCross RefCross Ref
  8. D. Gregg, A. Ertl, and A. Krall. A fast java interpreter. In Proceedings of the Workshop on Java optimisaton strategies for embedded systems (JOSES), Genoa, April 2001.]]Google ScholarGoogle Scholar
  9. J. Hoogerbrugge, L. Augusteijn, J. Trum, and R. van de Wiel. A code compression system based on pipelined interpreters. Software---Practice and Experience, 29(11):1005--1023, Sept. 1999.]] Google ScholarGoogle ScholarCross RefCross Ref
  10. G. J. Myers. The case against stack-oriented instruction sets. Computer Architecture News, 6(3):7--10, 1977.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. I. Piumarta and F. Riccardi. Optimizing direct threaded code by selective inlining. In SIGPLAN '98 Conference on Programming Language Design and Implementation, pages 291--300, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. A. Proebsting. Optimizing an ANSI C interpreter with superoperators. In Principles of Programming Languages (POPL '95), pages 322--332, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. V. Santos Costa. Optimising bytecode emulation for Prolog. In LNCS 1702, Proceedings of PPDP'99, pages 261--267. Springer-Verlag, September 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. SPEC. SPEC releases SPEC JVM98, first industry-standard benchmark for measuring Java virtual machine performance. Press Release, August 19 1998. http://www.specbench.org/osg/jvm98/press.html.]]Google ScholarGoogle Scholar
  15. D. Sugalski. http://www.parrotcode.org/.]]Google ScholarGoogle Scholar
  16. J. Waldron. Dynamic bytecode usage by object oriented java programs. In Proceedings of the Technology of Object-Oriented Languages and Systems 29th International Conference and Exhibition, Nancy, France, June 7--10 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The case for virtual register machines

      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
        IVME '03: Proceedings of the 2003 workshop on Interpreters, virtual machines and emulators
        June 2003
        76 pages
        ISBN:1581136552
        DOI:10.1145/858570

        Copyright © 2003 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: 8 June 2003

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader