Meta-Tracing Just-in-Time Compilation for RPython

Many dynamic languages are implemented using traditional interpreters because implementing just-in-time (JIT) compilers for them is too complex. This limits their performance and restricts their applicability. This thesis describes meta-tracing, a technique that makes it possible to apply a single tracing JIT compiler across a wide variety of languages. Meta-tracing is flexible enough to incorporate typical JIT techniques such as run-time type feedback and unboxing. With the help of several case studies, meta-tracing is applied to various language implementations. Performance measurements of using meta-tracing show improvements by up to factor 50 for implementations of production languages. Meta-tracing can thus simplify the implementation of high-performance virtual machines for dynamic languages significantly, making these languages more practical in a wider context.

[1]  Laurence Tratt,et al.  Dynamically Typed Languages , 2009, Adv. Comput..

[2]  John R. Rose Bytecodes meet combinators: invokedynamic on the JVM , 2009, VMIL '09.

[3]  Ian Piumarta,et al.  Optimizing direct threaded code by selective inlining , 1998, PLDI 1998.

[4]  John W. Lloyd,et al.  Partial Evaluation in Logic Programming , 1991, J. Log. Program..

[5]  Yoshihiko Futamura,et al.  Partial Evaluation of Computation Process--An Approach to a Compiler-Compiler , 1999, High. Order Symb. Comput..

[6]  Bart Demoen,et al.  On the Transformation of a Prolog Program to a More Efficient Binary Program , 1992, LOPSTR.

[7]  Toshio Nakatani,et al.  Reducing trace selection footprint for large-scale Java applications without performance loss , 2011, OOPSLA '11.

[8]  Markus Mock,et al.  DyC: an expressive annotation-directed dynamic compiler for C , 2000, Theor. Comput. Sci..

[9]  Urs Hölzle,et al.  Optimizing dynamically-dispatched calls with run-time type feedback , 1994, PLDI '94.

[10]  Thomas Lindgren,et al.  A Continuation-Passing Style for Prolog , 1994, ILPS.

[11]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[12]  James Harland,et al.  Evaluating the dynamic behaviour of Python applications , 2009, ACSC.

[13]  Todd A. Proebsting Optimizing an ANSI C interpreter with superoperators , 1995, POPL '95.

[14]  Benjamin Goldberg,et al.  Escape analysis on lists , 1992, PLDI '92.

[15]  Amer Diwan,et al.  Type-based alias analysis , 1998, PLDI.

[16]  Michael Salib,et al.  Starkiller: A Static Type Inferencer and Compiler for Python , 2004 .

[17]  Richard E. Jones,et al.  The Garbage Collection Handbook: The art of automatic memory management , 2011, Chapman and Hall / CRC Applied Algorithms and Data Structures Series.

[18]  Manuel Serrano,et al.  Compiling scheme to JVM bytecode:: a performance study , 2002, ICFP '02.

[19]  Robert Glück,et al.  Generating optimizing specializers , 1994, Proceedings of 1994 IEEE International Conference on Computer Languages (ICCL'94).

[20]  Cliff Click,et al.  The java hotspot TM server compiler , 2001 .

[21]  Konstantinos Sagonas,et al.  Demand-Driven Indexing of Prolog Clauses , 2007, ICLP.

[22]  Charles Consel,et al.  A general approach for run-time specialization and its application to C , 1996, POPL '96.

[23]  Ross Ihaka,et al.  Gentleman R: R: A language for data analysis and graphics , 1996 .

[24]  Alexandru Nicolau,et al.  Parallel processing: a smart compiler and a dumb machine , 1984, SIGPLAN '84.

[25]  Fritz Henglein,et al.  Dynamic Typing: Syntax and Proof Theory , 1994, Sci. Comput. Program..

[26]  Mason Chang,et al.  Trace-based just-in-time type specialization for dynamic languages , 2009, PLDI '09.

[27]  Gregory T. Sullivan Dynamic Partial Evaluation , 2001, PADO.

[28]  Søren Debois Imperative-program transformation by instrumented-interpreter specialization , 2008, High. Order Symb. Comput..

[29]  Urs Hölzle,et al.  Adaptive optimization for self: reconciling high performance with exploratory programming , 1994 .

[30]  Paul Tarau BinProlog: a Continuation Passing Style Prolog Engine , 1992, PLILP.

[31]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1990, Theor. Comput. Sci..

[32]  Serge Le Huitouze A New Data Structure for Implementing Extensions to Prolog , 1990, PLILP.

[33]  Jacques Noyé,et al.  A Uniform Approach for Compile-Time and Run-Time Specialization , 1996, Dagstuhl Seminar on Partial Evaluation.

[34]  Jens Palsberg,et al.  The essence of compiling with traces , 2011, POPL '11.

[35]  Toshio Nakatani,et al.  A trace-based Java JIT compiler retrofitted from a method-based compiler , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[36]  Torben Æ. Mogensen Constructor specialization , 1993, PEPM '93.

[37]  Michael Leuschel,et al.  Homeomorphic Embedding for Online Termination of Symbolic Methods , 2002, The Essence of Computation.

[38]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[39]  Jonathan Rees,et al.  A tractable Scheme implementation , 1994, LISP Symb. Comput..

[40]  Hanspeter Mössenböck,et al.  Run-Time Support for Optimizations Based on Escape Analysis , 2007, International Symposium on Code Generation and Optimization (CGO'07).

[41]  Keith D. Cooper,et al.  Engineering a Compiler , 2003 .

[42]  Michael Franz,et al.  Incremental Dynamic Code Generation with Trace Trees , 2006 .

[43]  Rastislav Bodík,et al.  Runtime specialization with optimistic heap analysis , 2005, OOPSLA '05.

[44]  Pierre Cointe Metaclasses are first class: The ObjVlisp Model , 1987, OOPSLA 1987.

[45]  Simon L. Peyton Jones,et al.  A short cut to deforestation , 1993, FPCA '93.

[46]  Jan Vitek,et al.  An analysis of the dynamic behavior of JavaScript programs , 2010, PLDI '10.

[47]  Eliot Miranda Context Management in VisualWorks 5i , 1999 .

[48]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[49]  William E. Byrd,et al.  The reasoned schemer , 2005 .

[50]  Mats Carlsson,et al.  How to Implement Prolog on a LISP Machine , 1984, Implementations of Prolog.

[51]  Thomas Wilke,et al.  A play on regular expressions: functional pearl , 2010, ICFP '10.

[52]  Guy L. Steele,et al.  The evolution of Lisp , 1993, HOPL-II.