skip to main content
10.1145/1869459.1869517acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

SPUR: a trace-based JIT compiler for CIL

Published: 17 October 2010 Publication History

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.

References

[1]
}}Andrew Clinick. Introducing JScript .NET, 2000. http://msdn.microsoft.com/ms974588.aspx.
[2]
}}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.
[3]
}}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.
[4]
}}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.
[5]
}}M. Bebenita, M. Chang, A. Gal, and M. Franz. Streambased dynamic compilation for object-oriented languages. In TOOLS (47), pages 77--95, 2009.
[6]
}}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.
[7]
}}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.
[8]
}}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.
[9]
}}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.
[10]
}}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.
[11]
}}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.
[12]
}}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.
[13]
}}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.
[14]
}}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.
[15]
}}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.
[16]
}}ECMA. International standard ECMA-355, Common Language Infrastructure, June 2006.
[17]
}}A. Gal. Efficient bytecode verification and compilation in a virtual machine. PhD thesis, Long Beach, CA, USA, 2006. Adviser Franz, Michael.
[18]
}}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.
[19]
}}A. Gal and M. Franz. Incremental dynamic code generation with trace trees. Technical Report ICS-TR-06--16, University of California, Irvine, 2006.
[20]
}}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.
[21]
}}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.
[22]
}}J. C. King. Symbolic execution and program testing. Commun. ACM, 19(7):385--394, 1976.
[23]
}}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.
[24]
}}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.
[25]
}}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.
[26]
}}Microsoft. Dynamic Language Runtime (DLR), 2010. http://www.codeplex.com/dlr/.
[27]
}}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.
[28]
}}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.
[29]
}}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.
[30]
}}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.

Cited By

View all
  • (2023)Product Authentication and Traceability Using Blockchaininternational journal of engineering technology and management sciences10.46647/ijetms.2023.v07i02.0657:2(556-559)Online publication date: 2023
  • (2023)FLOW: Filtering and LSTM-based Optimization for Web Browser InteractionsProceedings of the Eleventh International Symposium of Chinese CHI10.1145/3629606.3629611(37-43)Online publication date: 13-Nov-2023
  • (2023)Trace Balancing Technique for Trace Playback in LuNA SystemParallel Computing Technologies10.1007/978-3-031-41673-6_4(42-50)Online publication date: 15-Aug-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
October 2010
984 pages
ISBN:9781450302036
DOI:10.1145/1869459
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 10
    OOPSLA '10
    October 2010
    957 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1932682
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 October 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. cil
  2. dynamic compilation
  3. javascript
  4. just-in-time
  5. tracing

Qualifiers

  • Research-article

Conference

SPLASH '10
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)19
  • Downloads (Last 6 weeks)2
Reflects downloads up to 10 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Product Authentication and Traceability Using Blockchaininternational journal of engineering technology and management sciences10.46647/ijetms.2023.v07i02.0657:2(556-559)Online publication date: 2023
  • (2023)FLOW: Filtering and LSTM-based Optimization for Web Browser InteractionsProceedings of the Eleventh International Symposium of Chinese CHI10.1145/3629606.3629611(37-43)Online publication date: 13-Nov-2023
  • (2023)Trace Balancing Technique for Trace Playback in LuNA SystemParallel Computing Technologies10.1007/978-3-031-41673-6_4(42-50)Online publication date: 15-Aug-2023
  • (2021)Next-generation Web Applications with WebAssembly and TruffleWasm2021 44th International Convention on Information, Communication and Electronic Technology (MIPRO)10.23919/MIPRO52101.2021.9596883(1695-1700)Online publication date: 27-Sep-2021
  • (2021)ForerunnerProceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles10.1145/3477132.3483564(570-587)Online publication date: 26-Oct-2021
  • (2021)A Study of Call Graph Construction for JVM-Hosted LanguagesIEEE Transactions on Software Engineering10.1109/TSE.2019.295692547:12(2644-2666)Online publication date: 1-Dec-2021
  • (2020)Amalgamating different JIT compilations in a meta-tracing JIT compiler frameworkProceedings of the 16th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3426422.3426977(1-15)Online publication date: 17-Nov-2020
  • (2020)Interactive ClusteringACM Computing Surveys10.1145/334096053:1(1-39)Online publication date: 6-Feb-2020
  • (2020)From CIL to Java bytecode: Semantics-based translation for static analysis leveragingScience of Computer Programming10.1016/j.scico.2020.102392(102392)Online publication date: Jan-2020
  • (2019)Not so fastProceedings of the 2019 USENIX Conference on Usenix Annual Technical Conference10.5555/3358807.3358817(107-120)Online publication date: 10-Jul-2019
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media