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

Next in line, please!: exploiting the indirect benefits of inlining by accurately predicting further inlining

Published: 23 October 2011 Publication History

Abstract

Inlining is an important optimization that can lead to significant runtime improvements. When deciding whether or not to inline a method call, a virtual machine has to weigh an increase in compile time against the expected decrease in program time. To estimate the latter, however, state-of-the-art heuristics only use information local to the call-site in question. But inlining is a powerful enabling optimization; by eliminating the actual call it not only offers an obvious direct benefit but also indirect benefits, as information about the method's arguments is propagated from caller to callee. One such indirect benefit is the elimination of guards in case the callee inlines a method called on one of its arguments. In this paper, we show how to enhance an inlining heuristic by accurately predicting where this further inlining occurs--and where not. To do so, we only use information readily available to many virtual machines: the program's dynamic call graph. An implementation based on Jikes RVM demonstrates that this information can be used to successfully exploit inlining's indirect benefits while at the same time reducing compilation effort.

References

[1]
B. Alpern, D. Attanasio, A. Cocchi, D. Lieber, S. Smith, T. Ngo, and J. J. Barton. Implementing Jalapeño in Java. In Proceedings of the 14th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 1999.
[2]
M. Arnold and B. G. Ryder. Thin guards: A simple and effective technique for reducing the penalty of dynamic class loading. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), 2002.
[3]
M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive optimization in the Jalapeño JVM. In Proceedings of the 15th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2000\natexlaba.
[4]
M. Arnold, S. Fink, V. Sarkar, and P. F. Sweeney. A comparative study of static and profile-based heuristics for inlining. In Proceedings of the Workshop on Dynamic and Adaptive Compilation and Optimization (DYNAMO), 2000\natexlabb.
[5]
S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, 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, 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 21st Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA), 2006.
[6]
B. J. Bradel and T. S. Abdelrahman. The use of traces for inlining in Java programs. In R. Eigenmann, Z. Li, and S. Midkiff, editors, Languages and Compilers for High Performance Computing, volume 3602 of Lecture Notes in Computer Science, pages 922--922. Springer Berlin / Heidelberg, 2005.
[7]
J. Cavazos and M. F. P. O'Boyle. Automatic tuning of inlining heuristics. In Proceedings of the ACM/IEEE Conference on Supercomputing (SC), 2005.
[8]
M. Cierniak, G.-Y. Lueh, and J. M. Stichnoth. Practicing JUDO: Java under dynamic optimizations. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI), 2000.
[9]
J. Dean and C. Chambers. Towards better inlining decisions using inlining trials. In Proceedings of the Conference on LISP and Functional Programming (LFP), 1994.
[10]
J. Dean, C. Chambers, and D. Grove. Selective specialization for object-oriented languages. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI), 1995.
[11]
J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), 1995.
[12]
D. Detlefs and O. Agesen. Inlining of virtual methods. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), 1999.
[13]
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 (CGO), 2003.
[14]
A. Georges, L. Eeckhout, and D. Buytaert. Java performance evaluation through rigorous replay compilation. In Proceedings of the 23rd Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2008.
[15]
D. Grove, J. Dean, C. Garrett, and C. Chambers. Profile-guided receiver class prediction. In Proceedings of the 10th Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 1995.
[16]
K. Hazelwood and D. Grove. Adaptive online context-sensitive inlining. In Proceedings of the International Symposium on Code Generation and Optimization (CGO), 2003.
[17]
U. Hölzle and D. Ungar. Optimizing dynamically-dispatched calls with run-time type feedback. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI), 1994.
[18]
K. Hoste, A. Georges, and L. Eeckhout. Automated just-in-time compiler tuning. In Proceedings of the International Symposium on Code Generation and Optimization (CGO), 2010.
[19]
A. Shankar, M. Arnold, and R. Bodik. Jolt: lightweight dynamic analysis and removal of object churn. In Proceedings of the 23rd Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2008.
[20]
E. Steiner, A. Krall, and C. Thalinger. Adaptive inlining and on-stack replacement in the CACAO virtual machine. In Proceedings of the 5th International Symposium on Principles and Practice of Programming in Java (PPPJ), 2007.
[21]
T. Suganuma, T. Yasue, M. Kawahito, H. Komatsu, and T. Nakatani. A dynamic optimization framework for a Java just-in-time compiler. In Proceedings of the 16th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2001.

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)Investigating magic numbers: improving the inlining heuristic in the Glasgow Haskell CompilerProceedings of the 15th ACM SIGPLAN International Haskell Symposium10.1145/3546189.3549918(81-94)Online publication date: 6-Sep-2022
  • (2021)U can't inline this!Proceedings of the 31st Annual International Conference on Computer Science and Software Engineering10.5555/3507788.3507812(173-182)Online publication date: 22-Nov-2021
  • Show More Cited By

Index Terms

  1. Next in line, please!: exploiting the indirect benefits of inlining by accurately predicting further inlining

    Recommendations

    Comments