skip to main content
10.1145/2647508.2647521acmconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
research-article

Speculation without regret: reducing deoptimization meta-data in the Graal compiler

Published: 23 September 2014 Publication History

Abstract

Speculative optimizations are used in most Just In Time (JIT) compilers in order to take advantage of dynamic runtime feedback. These speculative optimizations usually require the compiler to produce meta-data that the Virtual Machine (VM) can use as fallback when a speculation fails. This meta-data can be large and incurs a significant memory overhead since it needs to be stored alongside the machine code for as long as the machine code lives. The design of the Graal compiler leads to many speculations falling back to a similar state and location. In this paper we present deoptimization grouping, an optimization using this property of the Graal compiler to reduce the amount of meta-data that must be stored by the VM without having to modify the VM. We compare our technique with existing meta-data compression techniques from the HotSpot Virtual Machine and study how well they combine. In order to make informed decisions about speculation meta-data, we present an empirical analysis of the origin, impact and usages of this meta-data.

References

[1]
src/share/vm/code/debugInfoRec.cpp. URL http://hg.openjdk.java.net/jdk8/jdk8/hotspot.
[2]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 169--190. ACM Press, Oct. 2006.
[3]
DaCapo Project. The DaCapo Benchmark Suite, 2012. URL http://dacapobench.org/.
[4]
G. Duboscq, L. Stadler, T. Würthinger, D. Simon, C. Wimmer, and H. Mössenböck. Graal IR: An extensible declarative intermediate representation. In Proceedings of the Asia-Pacific Programming Languages and Compilers Workshop, 2013.
[5]
G. Duboscq, T. Würthinger, L. Stadler, C. Wimmer, D. Simon, and H. Mössenböck. An intermediate representation for speculative optimizations in a dynamic compiler. In Proceedings of the ACM workshop on Virtual Machines and Intermediate Languages, 2013.
[6]
S. J. Fink and F. Qian. Design, implementation and evaluation of adaptive recompilation with on-stack replacement. In Proceedings of the International Symposium on Code Generation and Optimization, pages 241--252. IEEE Computer Society, 2003. ISBN 0-7695-1913-X.
[7]
A. Gal, C. W. Probst, and M. Franz. HotpathVM: An effective JIT compiler for resource-constrained devices. pages 144--153. ACM Press, 2006. ISBN 1-59593-332-8.
[8]
U. Hölzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 32--43. ACM Press, 1992. ISBN 0-89791-475-9.
[9]
T. Kotzmann, C. Wimmer, H. Mössenböck, T. Rodriguez, K. Russell, and D. Cox. Design of the Java HotSpot#8482; client compiler for Java 6. ACM Transactions on Architecture and Code Optimization, 5(1), May 2008. ISSN 1544-3566.
[10]
OpenJDK Community. Graal Project, 2012. URL http://openjdk.java.net/projects/graal/.
[11]
M. Paleczny, C. Vick, and C. Click. The Java HotSpot#8482; server compiler. In Proceedings of the Symposium on Java Virtual Machine Research and Technology, pages 1--12. USENIX, 2001.
[12]
M. Pall. LuaJIT 2.0 intellectual property disclosure and research opportunities, 2009. URL http://lua-users.org/lists/lua-l/2009-11/msg00089.html.
[13]
M. Pall. src/lj_snap.c, 2009. URL http://luajit.org/git/luajit-2.0.git.
[14]
D. Schneider and C. F. Bolz. The efficient handling of guards in the design of RPython's tracing JIT. In Proceedings of the ACM workshop on Virtual Machines and Intermediate Languages, pages 3--12. ACM Press, 2012. ISBN 978-1-4503-1633-0.
[15]
A. Sewe, M. Mezini, A. Sarimbekov, and W. Binder. Da Capo con Scala: design and analysis of a Scala benchmark suite for the Java virtual machine. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 657--676. ACM Press, 2011.
[16]
L. Stadler, T. Würthinger, and H. Mössenböck. Partial escape analysis and scalar replacement for Java. In Proceedings of the International Symposium on Code Generation and Optimization, pages 165--174. ACM Press, 2014. ISBN 978-1-4503-2670-4.
[17]
Standard Performance Evaluation Corporation. SPECjbb2005,. URL http://www.spec.org/jbb2005/.
[18]
Standard Performance Evaluation Corporation. SPECjvm2008,. URL http://www.spec.org/jvm2008/.
[19]
D. Ungar and R. B. Smith. Self: The power of simplicity. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 227--242. ACM Press, 1987. ISBN 0-89791-247-0.
[20]
C. Wimmer, M. Haupt, M. L. Van De Vanter, M. Jordan, L. Daynès, and D. Simon. Maxine: An approachable virtual machine for, and in, java. ACM Transactions on Architecture and Code Optimization, 9(4): 30:1--30:24, Jan. 2013. ISSN 1544-3566.

Cited By

View all
  • (2023)Exploiting Partially Context-sensitive Profiles to Improve Performance of Hot CodeACM Transactions on Programming Languages and Systems10.1145/361293745:4(1-64)Online publication date: 13-Sep-2023
  • (2022)Improving Vectorization Heuristics in a Dynamic Compiler with Machine Learning ModelsProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567679(36-47)Online publication date: 29-Nov-2022
  • (2022)Inlining-Benefit Prediction with Interprocedural Partial Escape AnalysisProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567677(13-24)Online publication date: 29-Nov-2022
  • Show More Cited By

Index Terms

  1. Speculation without regret: reducing deoptimization meta-data in the Graal compiler

    Recommendations

    Comments