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

The efficient handling of guards in the design of RPython's tracing JIT

Published: 21 October 2012 Publication History

Abstract

Tracing just-in-time (JIT) compilers record linear control flow paths, inserting operations called guards at points of possible divergence. These operations occur frequently in generated traces and therefore it is important to design and implement them carefully to find the right trade-off between deoptimization, memory overhead, and (partly) execution speed. In this paper, we perform an empirical analysis of runtime properties of guards. This is used to guide the design of guards in the RPython tracing JIT.

References

[1]
D. Ancona, M. Ancona, A. Cuni, and N. D. Matsakis. RPython: a step towards reconciling dynamically and statically typed OO languages. In DLS, Montreal, Quebec, Canada, 2007. ACM.
[2]
V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A Transparent Dynamic Optimization System. In PLDI 2000.
[3]
M. Bebenita, F. Brandner, M. Fahndrich, F. Logozzo, W. Schulte, N. Tillmann, and H. Venter. SPUR: a trace-based JIT compiler for CIL. In OOPSLA, Reno/Tahoe, Nevada, USA, 2010. ACM.
[4]
M. Bebenita, M. Chang, G. Wagner, A. Gal, C. Wimmer, and M. Franz. Trace-based compilation in execution environments without interpreters. In Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java, pages 59--68, Vienna, Austria, 2010. ACM.
[5]
C. F. Bolz, A. Cuni, M. FijaBkowski, M. Leuschel, S. Pedroni, and A. Rigo. Allocation removal by partial evaluation in a tracing JIT. In PEPM, Austin, Texas, USA, 2011.
[6]
C. F. Bolz, A. Cuni, M. FijaBkowski, M. Leuschel, S. Pedroni, and A. Rigo. Runtime feedback in a meta-tracing JIT for efficient dynamic languages. ICOOOLPS'11, page 9:1--9:8. ACM, 2011.
[7]
C. F. Bolz, A. Cuni, M. FijaBkowski, and A. Rigo. Tracing the meta-level: PyPy's tracing JIT compiler. In ICOOOLPS, pages 18--25, Genova, Italy, 2009. ACM.
[8]
C. F. Bolz, A. Kuhn, A. Lienhard, N. Matsakis, O. Nierstrasz, L. Renggli, A. Rigo, and T. Verwaest. Back to the future in one week -- implementing a Smalltalk VM in PyPy. In Self-Sustaining Systems, pages 123--139. 2008.
[9]
C. F. Bolz, M. Leuschel, and D. Schneider. Towards a jitting VM for prolog execution. In PPDP, Hagenberg, Austria, 2010. ACM.
[10]
O. Callaú, R. Robbes, É. Tanter, and D. Röthlisberger. How developers use the dynamic features of programming languages: the case of Smalltalk. In Proceedings of the 8th Working Conference on Mining Software Repositories, MSR'11, page 23--32. ACM, 2011.
[11]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, 1991.
[12]
L. P. Deutsch and A. M. Schiffman. Efficient implementation of the Smalltalk-80 system. In POPL, Salt Lake City, Utah, 1984. ACM.
[13]
A. Gal, M. Franz, B. Eich, M. Shaver, and D. Anderson. Trace-based Just-in-Time Type Specialization for Dynamic Languages. In PLDI 2009.
[14]
A. Gal, C. W. Probst, and M. Franz. HotpathVM: An Effective JIT Compiler for Resource-constrained Devices. VEE 2006, pages 144--153. ACM, 2006.
[15]
A. Holkner and J. Harland. Evaluating the dynamic behaviour of Python applications. In Proceedings of the Thirty-Second Australasian Conference on Computer Science - Volume 91, pages 19--28, Wellington, New Zealand, 2009. Australian Computer Society, Inc.
[16]
U. Hölzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. PLDI'92, page 32--43. ACM, 1992.
[17]
T. Kotzmann and H. Mossenbock. Run-time support for optimizations based on escape analysis. CGO'07, page 49--60, Washington, DC, USA, 2007. IEEE Computer Society.
[18]
T. Kotzmann and H. Mössenböck. Escape analysis in the context of dynamic compilation and deoptimization. VEE'05, page 111--120. ACM, 2005.
[19]
M. Paleczny, C. Vick, and C. Click. The Java HotSpot server compiler. In Proceedings of the Java Virtual Machine Research and Technology Symposium on Java Virtual Machine Research and Technology Symposium - Volume 1, Monterey, California, 2001. USENIX Association.
[20]
M. Pall. LuaJIT 2.0 intellectual property disclosure and research opportunities, June 2009. http://lua-users.org/lists/lua-l/2009--11/msg00089.html.
[21]
G. Richards, S. Lebresne, B. Burg, and J. Vitek. An analysis of the dynamic behavior of JavaScript programs. In PLDI 2010, pages 1--12, Toronto, Ontario, Canada, 2010. ACM.
[22]
A. Rigo and S. Pedroni. PyPy's approach to virtual machine construction. In DLS, Portland, Oregon, USA, 2006. ACM.

Cited By

View all
  • (2022)Deoptless: speculation with dispatched on-stack replacement and specialized continuationsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523729(749-761)Online publication date: 9-Jun-2022
  • (2021)ForerunnerProceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles10.1145/3477132.3483564(570-587)Online publication date: 26-Oct-2021
  • (2018)On-stack replacement, distilledACM SIGPLAN Notices10.1145/3296979.319239653:4(166-180)Online publication date: 11-Jun-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
VMIL '12: Proceedings of the sixth ACM workshop on Virtual machines and intermediate languages
October 2012
66 pages
ISBN:9781450316330
DOI:10.1145/2414740
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: 21 October 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. deoptimization
  2. guards
  3. tracing jit

Qualifiers

  • Research-article

Conference

SPLASH '12
Sponsor:

Acceptance Rates

Overall Acceptance Rate 4 of 4 submissions, 100%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)2
Reflects downloads up to 08 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2022)Deoptless: speculation with dispatched on-stack replacement and specialized continuationsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523729(749-761)Online publication date: 9-Jun-2022
  • (2021)ForerunnerProceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles10.1145/3477132.3483564(570-587)Online publication date: 26-Oct-2021
  • (2018)On-stack replacement, distilledACM SIGPLAN Notices10.1145/3296979.319239653:4(166-180)Online publication date: 11-Jun-2018
  • (2018)On-stack replacement, distilledProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3192366.3192396(166-180)Online publication date: 11-Jun-2018
  • (2017)Correctness of speculative optimizations with dynamic deoptimizationProceedings of the ACM on Programming Languages10.1145/31581372:POPL(1-28)Online publication date: 27-Dec-2017
  • (2017)Cross-layer workload characterization of meta-tracing JIT VMs2017 IEEE International Symposium on Workload Characterization (IISWC)10.1109/IISWC.2017.8167760(97-107)Online publication date: Oct-2017
  • (2016)Improving trace-based JIT optimisation using whole-program informationProceedings of the 8th International Workshop on Virtual Machines and Intermediate Languages10.1145/2998415.2998418(16-23)Online publication date: 31-Oct-2016
  • (2016)Flexible on-stack replacement in LLVMProceedings of the 2016 International Symposium on Code Generation and Optimization10.1145/2854038.2854061(250-260)Online publication date: 29-Feb-2016
  • (2014)Speculation without regretProceedings of the 2014 International Conference on Principles and Practices of Programming on the Java platform: Virtual machines, Languages, and Tools10.1145/2647508.2647521(187-193)Online publication date: 23-Sep-2014
  • (2013)An intermediate representation for speculative optimizations in a dynamic compilerProceedings of the 7th ACM workshop on Virtual machines and intermediate languages10.1145/2542142.2542143(1-10)Online publication date: 28-Oct-2013
  • 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