Abstract
We introduce straf, a Scala framework for recording and optimizing execution traces of an interpreter it is composed with. For interpreters that satisfy the requirements detailed in this paper, this composition requires but a small effort from the implementer to result in a trace-based JIT compiler. We describe the framework, and illustrate its composition with a Scheme interpreter that satisfies the aforementioned requirements. We benchmark the resulting trace-based JIT compiler on a set of Scheme programs. Finally, we implement an optimization to demonstrate that straf enables further experimentation in the domain.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Bolz, C.F., Cuni, A., Fijalkowski, M., Rigo, A.: Tracing the meta-level: Pypy’s tracing JIT compiler. In: Proceedings of the 4th ICOOOLPS Workshop (2009)
Chang, M., Bebenita, M., Yermolovich, A., Gal, A., Franz, M.: 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 Irvine, Department of Computer Science (2007)
Chang, M., Smith, E., Reitmaier, R., Bebenita, M., Gal, A., Wimmer, C., Eich, B., Franz, M.: Tracing for web 3.0: trace compilation for the next generation web applications. In: Proceedings of the 2009 ACM SIGPLAN/SIGOPS International VEE Conference (2009)
Corporation, N.: Constant folding. http://www.compileroptimizations.com/category/constant_folding.htm. Accessed 24 May 2016
Felleisen, M., Friedman, D.P.: Control Operators, the SECD-machine, and the \(\lambda \)-calculus. Indiana University, Computer Science Department (1986)
Felleisen, M., Friedman, D.P.: A calculus for assignments in higher-order languages. In: Proceedings of the 14th ACM SIGACT-SIGPLAN POPL Symposium (1987)
Gal, A., Eich, B., Shaver, M., Anderson, D., Mandelin, D., Haghighat, M.R., Kaplan, B., Hoare, G., Zbarsky, B., Orendorff, J., Ruderman, J., Smith, E.W., Reitmaier, R., Bebenita, M., Chang, M., Franz, M.: Trace-based just-in-time type specialization for dynamic languages. In: Proceedings of the 30th ACM SIGPLAN PLDI Conference (2009)
Gal, A., Probst, C.W., Franz, M.: Hotpathvm: an effective JIT compiler for resource-constrained devices. In: Proceedings of the 2nd International VEE Conference (2006)
Marr, S., Ducasse, S.: Tracing vs. partial evaluation: comparing meta-compilation approaches for self-optimizing interpreters. In: Proceedings of the 2015 ACM International OOPSLA Conference (2015)
Stiévenart, Q., Nicolay, J., De Meuter, W., De Roover, C.: Building a modular static analysis framework in scala (tool paper). In: Proceedings of the 2016 7th ACM SIGPLAN Symposium on Scala, SCALA 2016, NY, USA, pp. 105–109 (2016). http://doi.acm.org/10.1145/2998392.3001579
Vandercammen, M., De Roover, C.: Improving trace-based JIT optimisation using whole-program information. In: Proceedings of the 8th International Workshop on Virtual Machines and Intermediate Languages, VMIL 2016, NY, USA, pp. 16–23 (2016). http://doi.acm.org/10.1145/2998415.2998418
Vandercammen, M., Nicolay, J., Marr, S., De Koster, J., D’Hondt, T., De Roover, C.: A formal foundation for trace-based JIT compilers. In: Proceedings of the 13th WODA (2015)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Vandercammen, M., Stiévenart, Q., De Meuter, W., De Roover, C. (2017). STRAF: A Scala Framework for Experiments in Trace-Based JIT Compilation. In: Cunha, J., Fernandes, J., Lämmel, R., Saraiva, J., Zaytsev, V. (eds) Grand Timely Topics in Software Engineering. GTTSE 2015. Lecture Notes in Computer Science(), vol 10223. Springer, Cham. https://doi.org/10.1007/978-3-319-60074-1_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-60074-1_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-60073-4
Online ISBN: 978-3-319-60074-1
eBook Packages: Computer ScienceComputer Science (R0)