skip to main content
10.1145/1254810.1254823acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
Article

YETI: a graduallY extensible trace interpreter

Published:13 June 2007Publication History

ABSTRACT

The design of new programming languages benefits from interpretation, which can provide a simple initial implementation, flexibility to explore new language features, and portability to many platforms. The only downside is speed of execution, as there remains a large performance gap between even efficient interpreters and mixed-mode systems that include a just-in-time compiler (or JIT for short). Augmenting an interpreter with a JIT, however, is not a small task. Today, JITs used for Java™ are loosely-coupled with the interpreter, with callsites of methods being the only transition point between interpreted and native code. To compile whole methods, the JIT must duplicate a sizable amount of functionality already provided by the interpreter, leading to a "big bang" development effort before the JIT can be deployed. Instead, adding a JIT to an interpreter would be easier if it were possible to leverage the existing functionality.

In earlier work we showed that packaging virtual instructions as lightweight callable routines is an efficient way to build an interpreter. In this paper we describe how callable bodies help our interpreter to efficiently identify and run traces. Our closely coupled dynamic compiler can fall back on the interpreter in various ways, permitting an incremental approach in which additional performance gains can be realized as it is extended in two dimensions: (i) generating code for more types of virtual instructions, and (ii) identifying larger compilation units. Currently, Yeti identifies straight line regions of code and traces, and generates non-optimized code for roughly 50 Java integer and object bytecodes. Yeti runs roughly twice as fast as a direct-threaded interpreter on SPECjvm98 benchmarks.

References

  1. V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A transparent dynamic optimization system. In Proc. of the ACM SIGPLAN 2000 Conf. on Prog. Language Design and Impl., pages 1--12, Jun. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Berndl, B. Vitale, M. Zaleski, and A. D. Brown. Context threading: A flexible and efficient dispatch technique for virtual machine interpreters. In Proc. of the 3rd Intl. Symp. on Code Generation and Optimization, pages 15--26, Mar. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. Bruening and E. Duesterwald. Exploring optimal compilation unit shapes for an embedded just-in-time compiler. In Proc. of the 3rd ACM Workshop on Feedback-Directed and Dynamic Optimization (FDDO-3), Dec. 2000.Google ScholarGoogle Scholar
  4. D. Bruening, T. Garnett, and S. Amarasinghe. An infrastructure for adaptive dynamic optimization. In Proc. of the 1st Intl. Symp. on Code Generation and Optimization, pages 265--275, Mar. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. W.-K. Chen, S. Lerner, R. Chaiken, and D. Gillies. Mojo: A dynamic optimization system. In Proc. of the 3rd ACMWorkshop on Feedback-Directed and Dynamic Optimization (FDDO-3), Dec. 2000.Google ScholarGoogle Scholar
  6. J. C. Dehnert, B. K. Grant, J. P. Banning, R. Johnson, T. Kistler, A. Klaiber, and J. Mattson. The Transmeta code morphing software: Using speculation, recovery, and adaptive retranslation to address real-life challenges. In Proc. of the 1st Intl. Symp. on Code Generation and Optimization, pages 15--24, Mar. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. K. Driesen. Efficient Polymorphic Calls. Klumer Academic Publishers, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Duesterwald and V. Bala. Software profiling for hot path prediction: less is more. ACM SIGPLAN Notices, 35(11):202--211, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. A. Ertl. Stack caching for interpreters. In Proc. of the ACM SIGPLAN 1995 Conf. on Prog. Language Design and Impl., pages 315--327, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. A. Ertl and D. Gregg. Optimizing indirect branch prediction accuracy in virtual machine interpreters. In Proc. of the ACM SIGPLAN 2003 Conf. on Prog. Language Design and Impl., pages 278--288, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Gagnon and L. Hendren. Effective inline threading of Java bytecode using preparation sequences. In Proc. of the 12th Intl. Conf. on Compiler Construction, volume 2622 of Lecture Notes in Computer Science, pages 170--184. Springer, Apr. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Gal, C. W. Probst, and M. Franz. HotpathVM: an effective JIT compiler for resource-constrained devices. In Proc. of the 2nd Intl. Conf. on Virtual Execution Environments, pages 144--153, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. Hazelwood and D. Grove. Adaptive online context-sensitive inlining. In Proc. of the 1st Intl. Symp. on Code Generation and Optimization, pages 253--264, Mar. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Hiniker, K. Hazelwood, and M. D. Smith. Improving region selection in dynamic optimization systems. In Proc. of the 38th Intl. Symp. on Microarchitecture, pages 141--154, Nov. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. U. Hölzle. Adaptive Optimization For Self:Reconciling High Performance With Exploratory Programming. PhD thesis, Stanford University, 1994.Google ScholarGoogle Scholar
  16. R. Lougher. JamVM {online}. Available from: http://jamvm.sourceforge.net/.Google ScholarGoogle Scholar
  17. M. Paleczny, C. Vick, and C. Click. The Java HotSpot™ server compiler. In Proc. of the USENIX Java Virtual Machine Research and Technology Symposium, pages 1--12, Apr. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. I. Pechtchanski and V. Sarkar. Dynamic optimistic interprocedural analysis: A framework and an application. In Proc. of the 16th ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pages 195--210, Oct. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. I. Piumarta. Ccg: A tool for writing dynamic code generators. In OOPSLA'99 Workshop on simplicity, performance and portability in virtual machine design, Nov. 1999.Google ScholarGoogle Scholar
  20. I. Piumarta and F. Riccardi. Optimizing direct-threaded code by selective inlining. In Proc. of the ACM SIGPLAN 1998 Conf. on Prog. Language Design and Impl., pages 291--300, June 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. SPECjvm98 benchmarks {online}. 1998. Available from: http://www.spec.org/osg/jvm98/.Google ScholarGoogle Scholar
  22. D. Sugalski. Implementing an interpreter {online}. Available from: http://www.sidhe.org/%7Edan/presentations/Parrot%20Implementation.ppt. Notes for slide 21.Google ScholarGoogle Scholar
  23. 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 Systems Journals, Java Performance Issue, 39(1), Feb. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. Suganuma, T. Yasue, and T. Nakatani. A region-based compilation technique for dynamic compilers. ACM Trans. Program. Lang. Syst., 28(1):134--174, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. V. Sundaresan, D. Maier, P. Ramarao, and M. Stoodley. Experiences with multi-threading and dynamic class loading in a Java just-in-time compiler. In Proc. of the 4th Intl. Symp. on Code Generation and Optimization, pages 87--97, Mar. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Ungar, R. B. Smith, C. Chambers, and U. Hölzle. Object, message, and performance: how they coexist in Self. IEEE-COMPUTER, 25(10):53--64, Oct. 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Whaley. Partial method compilation using dynamic profile information. In Proc. of the 16th ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pages 166--179, Oct. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. YETI: a graduallY extensible trace 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
      VEE '07: Proceedings of the 3rd international conference on Virtual execution environments
      June 2007
      210 pages
      ISBN:9781595936301
      DOI:10.1145/1254810

      Copyright © 2007 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: 13 June 2007

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate80of235submissions,34%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader