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

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    SPLASH '11 Workshops: Proceedings of the compilation of the co-located workshops on DSM'11, TMC'11, AGERE! 2011, AOOPES'11, NEAT'11, & VMIL'11
    October 2011
    358 pages
    ISBN:9781450311830
    DOI:10.1145/2095050
    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: 23 October 2011

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. guard elimination
    2. indirect benefits
    3. inlining

    Qualifiers

    • Research-article

    Conference

    SPLASH '11
    Sponsor:

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)6
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 27 Feb 2025

    Other Metrics

    Citations

    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
    • (2019)An optimization-driven incremental inline substitution algorithm for just-in-time compilersProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314893(164-179)Online publication date: 16-Feb-2019
    • (2019)An Optimization-Driven Incremental Inline Substitution Algorithm for Just-in-Time Compilers2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2019.8661171(164-179)Online publication date: Feb-2019
    • (2016)Parallel incremental whole-program optimizations for Scala.jsACM SIGPLAN Notices10.1145/3022671.298401351:10(59-73)Online publication date: 19-Oct-2016
    • (2016)Parallel incremental whole-program optimizations for Scala.jsProceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2983990.2984013(59-73)Online publication date: 19-Oct-2016
    • (2016)Preexistence and concrete type analysis in the context of multiple inheritanceProceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools10.1145/2972206.2972207(1-12)Online publication date: 29-Aug-2016
    • (2012)Some new approaches to partial inliningProceedings of the sixth ACM workshop on Virtual machines and intermediate languages10.1145/2414740.2414749(39-48)Online publication date: 21-Oct-2012

    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