ABSTRACT
Tracing just-in-time compilers (TJITs) determine frequently executed traces (hot paths and loops) in running programs and focus their optimization effort by emitting optimized machine code specialized to these traces. Prior work has established this strategy to be especially beneficial for dynamic languages such as JavaScript, where the TJIT interfaces with the interpreter and produces machine code from the JavaScript trace.
This direct coupling with a JavaScript interpreter makes it difficult to harness the power of a TJIT for other components that are not written in JavaScript, e.g., the DOM implementation or the layout engine inside a browser. Furthermore, if a TJIT is tied to a particular high-level language interpreter, it is difficult to reuse it for other input languages as the optimizations are likely targeted at specific idioms of the source language.
To address these issues, we designed and implemented a TJIT for Microsoft's Common Intermediate Language CIL (the target language of C#, VisualBasic, F#, and many other languages). Working on CIL enables TJIT optimizations for any program compiled to this platform. In addition, to validate that the performance gains of a TJIT for JavaScript do not depend on specific idioms of JavaScript that are lost in the translation to CIL, we provide a performance evaluation of our JavaScript runtime which translates JavaScript to CIL and then runs on top of our CIL TJIT.
- }}Andrew Clinick. Introducing JScript .NET, 2000. http://msdn.microsoft.com/ms974588.aspx.Google Scholar
- }}M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive optimization in the JalapeÜno JVM. In OOPSLA '00: Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 47--65, New York, NY, USA, 2000. ACM. Google ScholarDigital Library
- }}M. Arnold, M. Hind, and B. G. Ryder. Online feedbackdirected optimization of Java. In OOPSLA '02: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 111--129, New York, NY, USA, 2002. ACM. Google ScholarDigital Library
- }}V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: a transparent dynamic optimization system. In PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 1--12, New York, NY, USA, 2000. ACM. Google ScholarDigital Library
- }}M. Bebenita, M. Chang, A. Gal, and M. Franz. Streambased dynamic compilation for object-oriented languages. In TOOLS (47), pages 77--95, 2009.Google Scholar
- }}M. Bebenita, M. Chang, K. Manivannan, G. Wagner, M. Cintra, B. Mathiske, A. Gal, C. Wimmer, and M. Franz. Trace based compilation in interpreter-less execution environments. Technical Report ICS-TR-10-01, University of California, Irvine, March 2010.Google Scholar
- }}C. F. Bolz, A. Cuni, M. Fijalkowski, and A. Rigo. Tracing the meta-level: Pypy's tracing jit compiler. In ICOOOLPS '09: Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems, pages 18--25, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- }}B. J. Bradel and T. S. Abdelrahman. Automatic trace-based parallelization of java programs. In ICPP '07: Proceedings of the 2007 International Conference on Parallel Processing, page 26, Washington, DC, USA, 2007. IEEE Computer Society. Google ScholarDigital Library
- }}D. Bruening, T. Garnett, and S. Amarasinghe. An infrastructure for adaptive dynamic optimization. In CGO '03: Proceedings of the international symposium on Code generation and optimization, pages 265--275, Washington, DC, USA, 2003. IEEE Computer Society. Google ScholarDigital Library
- }}C. Chambers and D. Ungar. Customization: optimizing compiler technology for self, a dynamically-typed object-oriented programming language. In PLDI '89: Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation, pages 146--160, New York, NY, USA, 1989. ACM. Google ScholarDigital Library
- }}M. Chang, M. Bebenita, A. Yermolovich, A. Gal, and M. Franz. Efficient just-in-time execution of dynamically typed languages via code specialization using precise runtime type inference. Technical Report ICS-TR-07--10, University of California, Irvine, 2007.Google Scholar
- }}M. Chang, E. Smith, R. Reitmaier, M. Bebenita, A. Gal, C.Wimmer, B. Eich, and M. Franz. Tracing for web 3.0: trace compilation for the next generation web applications. In VEE '09: Proceedings of the 2009 ACM SIGPLAN/SIGOPS international conference on Virtual execution environments, pages 71--80, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- }}A. Cuni, D. Ancona, and A. Rigo. Faster than c#: efficient implementation of dynamic languages on .net. In ICOOOLPS '09: Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems, pages 26--33, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- }}L. De Moura and N. Bjørner. Z3: an efficient SMT solver. In TACAS'08/ETAPS'08: Proceedings of the Theory and practice of software, 14th international conference on Tools and algorithms for the construction and analysis of systems, pages 337--340, Berlin, Heidelberg, 2008. Springer-Verlag. Google ScholarDigital Library
- }}J. C. Dehnert, B. K. Grant, J. P. Banning, R. Johnson, T. Kistler, A. Klaiber, and J. Mattson. The transmeta code morphingTMsoftware: using speculation, recovery, and adaptive retranslation to address real-life challenges. In CGO '03: Proceedings of the international symposium on Code generation and optimization, pages 15--24, Washington, DC, USA, 2003. IEEE Computer Society. Google ScholarDigital Library
- }}ECMA. International standard ECMA-355, Common Language Infrastructure, June 2006.Google Scholar
- }}A. Gal. Efficient bytecode verification and compilation in a virtual machine. PhD thesis, Long Beach, CA, USA, 2006. Adviser Franz, Michael. Google ScholarDigital Library
- }}A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. Trace-based just-in-time type specialization for dynamic languages. In PLDI '09: Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation, pages 465--478, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- }}A. Gal and M. Franz. Incremental dynamic code generation with trace trees. Technical Report ICS-TR-06--16, University of California, Irvine, 2006.Google Scholar
- }}A. Gal, C. W. Probst, and M. Franz. HotpathVM: an effective jit compiler for resource-constrained devices. In VEE '06: Proceedings of the 2nd international conference on Virtual execution environments, pages 144--153, New York, NY, USA, 2006. ACM. Google ScholarDigital Library
- }}J. Ha, M. Arnold, S. M. Blackburn, and K. S. McKinley. A concurrent dynamic analysis framework for multicore hardware. In OOPSLA '09: Proceeding of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications, pages 155--174, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- }}J. C. King. Symbolic execution and program testing. Commun. ACM, 19(7):385--394, 1976. Google ScholarDigital Library
- }}F. Logozzo and H. Venter. RATA: Rapid atomic type analysis by abstract interpretation application to JavaScript optimization. In Compiler Construction, volume 6011 of LNCS, pages 66--83. Springer-Verlag, 2010. Google ScholarDigital Library
- }}B. Mathiske. The maxine virtual machine and inspector. In OOPSLA Companion '08: Companion to the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications, pages 739--740, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- }}D. Merrill and K. Hazelwood. Trace fragment selection within method-based jvms. In VEE '08: Proceedings of the fourth ACM SIGPLAN/SIGOPS international conference on Virtual execution environments, pages 41--50, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- }}Microsoft. Dynamic Language Runtime (DLR), 2010. http://www.codeplex.com/dlr/.Google Scholar
- }}A. Rigo and S. Pedroni. PyPy's approach to virtual machine construction. In OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications, pages 944--953, New York, NY, USA, 2006. ACM. Google ScholarDigital Library
- }}T. Suganuma, T. Yasue, and T. Nakatani. A region-based compilation technique for dynamic compilers. ACM Transactions on Programming Languages and Systems, 28(1):134--174, 2006. Google ScholarDigital Library
- }}A. Yermolovich, C. Wimmer, and M. Franz. Optimization of dynamic languages using hierarchical layering of virtual machines. In DLS '09: Proceedings of the 5th symposium on Dynamic languages, pages 79--88, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- }}M. Zaleski, A. D. Brown, and K. Stoodley. Yeti: a gradually extensible trace interpreter. In VEE '07: Proceedings of the 3rd international conference on Virtual execution environments, pages 83--93, New York, NY, USA, 2007. ACM. Google ScholarDigital Library
Index Terms
- SPUR: a trace-based JIT compiler for CIL
Recommendations
SPUR: a trace-based JIT compiler for CIL
OOPSLA '10Tracing just-in-time compilers (TJITs) determine frequently executed traces (hot paths and loops) in running programs and focus their optimization effort by emitting optimized machine code specialized to these traces. Prior work has established this ...
Tracing for web 3.0: trace compilation for the next generation web applications
VEE '09: Proceedings of the 2009 ACM SIGPLAN/SIGOPS international conference on Virtual execution environmentsToday's web applications are pushing the limits of modern web browsers. The emergence of the browser as the platform of choice for rich client-side applications has shifted the use of in-browser JavaScript from small scripting programs to large ...
Bringing low-level languages to the JVM: efficient execution of LLVM IR on Truffle
VMIL 2016: Proceedings of the 8th International Workshop on Virtual Machines and Intermediate LanguagesAlthough the Java platform has been used as a multi-language platform, most of the low-level languages (such as C, Fortran, and C++) cannot be executed efficiently on the JVM. We propose Sulong, a system that can execute LLVM-based languages on the ...
Comments