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

Efficient code management for dynamic multi-tiered compilation systems

Published: 23 September 2014 Publication History

Abstract

Managed runtime environments (MREs) like web browsers or the Java Virtual Machine (JVM) include multiple dynamic compilers (or compiler configurations) to provide a good tradeoff between compilation speed and generated code quality: Longer compilation times typically imply better code quality and hence better peak performance than shorter compilation times, which provide good warmup/startup performance and lower peak performance. A system that uses multiple compilers is referred to as a multi-tiered compilation system.
Multi-tiered compilation systems pose a significant challenge to the code cache, since methods can be compiled multiple times at different compilation levels. The characteristics of muti-tiered compiled code (e.g., lifetime, size, etc.) can lead to an inefficient code cache usage. This paper discusses the challenges in the context of the Java Virtual Machine (JVM) and proposes a new code cache design that aims at solving these challenges.
A detailed performance evaluation shows that our new code cache design improves overall performance by up to 7%. The performance gain results from a combination of faster code cache sweeping as well as better instruction TLB and instruction cache behavior.

References

[1]
B. Alpern, C. R. Attanasio, A. Cocchi, D. Lieber, S. Smith, T. Ngo, J. J. Barton, S. F. Hummel, J. C. Sheperd, and M. Mergen. Implementing Jalapeno in Java. In Proceedings of the 14th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA '99, pages 314--324, New York, NY, USA, 1999. ACM.
[2]
M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive Optimization in the Jalapeno JVM. In Proceedings of the 15th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA '00, pages 47--65, New York, NY, USA, 2000. ACM.
[3]
D. Detlefs and O. Agesen. Inlining of Virtual Methods. In Proceedings of the 13th European Conference on Object-Oriented Programming, ECOOP '99, pages 258--278, London, UK, 1999. Springer-Verlag.
[4]
Google. Octane Benchmark. https://developers.google.com/octane/.
[5]
T. Hartmann. Code Cache Optimizations for Dynamically Compiled Languages. http://e-collection.library.ethz.ch/eserv/eth:8304/eth-8304-01.pdf, 2014.
[6]
K. Hazelwood and M. D. Smith. Managing Bounded Code Caches in Dynamic Binary Optimization Systems. ACM Trans. Archit. Code Optim., 3(3):263--294, Sept. 2006.
[7]
P. Hofer and H. Mössenböck. Efficient and Accurate Stack Trace Sampling in the Java Hotspot Virtual Machine. In Proceedings of the 5th ACM/SPEC International Conference on Performance Engineering, ICPE '14, pages 277--280, New York, NY, USA, 2014. ACM.
[8]
U. Hölzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. In Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, PLDI '92, pages 32--43, New York, NY, USA, 1992. ACM.
[9]
Y.-C. Huang, Y.-S. Chen, W. Yang, and J. J.-J. Shann. File-Based Sharing For Dynamically Compiled Code On Dalvik Virtual Machine. Computer Symposium (ICS), 2010.
[10]
H. Inoue and T. Nakatani. How a Java VM Can Get More from a Hardware Performance Monitor. In Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA '09, pages 137--154, New York, NY, USA, 2009. ACM.
[11]
H. Inoue and T. Nakatani. Identifying the sources of cache misses in java programs without relying on hardware counters. In ISMM, pages 133--142, 2012.
[12]
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 Trans. Archit. Code Optim., 5(1):7:1--7:32, May 2008.
[13]
J. Lau, M. Arnold, M. Hind, and B. Calder. Online Performance Auditing: Using Hot Optimizations Without Getting Burned. In Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '06, pages 239--251, New York, NY, USA, 2006. ACM.
[14]
M. Paleczny, C. Vick, and C. Click. The Java Hotspot#8482;Server Compiler. In Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1, JVM'01, pages 1--1, Berkeley, CA, USA, 2001. USENIX Association.
[15]
F. T. Schneider, M. Payer, and T. R. Gross. Online Optimizations Driven by Hardware Performance Monitoring. In Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '07, pages 373--382, New York, NY, USA, 2007. ACM.
[16]
Standard Performance Evaluation Corporation. SPECjbb2005. http://www.spec.org/jbb2005/, 2005.
[17]
A. Szegedi. Project Nashorn in Java 8. http://www.parleys.com/play/51afc0e7e4b01033a7e4b6e9/chapter30/about, 2013.
[18]
Wikipedia. External fragmentation. http://en.wikipedia.org/wiki/Fragmentation_(computing)#External_fragmentation.
[19]
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 Trans. Archit. Code Optim., 9(4):30:1--30:24, Jan. 2013.
[20]
T. Würthinger, C. Wimmer, and H. Mössenböck. Array Bounds Check Elimination for the Java Hotspot Client Compiler. In Proceedings of the 5th International Symposium on Principles and Practice of Programming in Java, PPPJ '07, pages 125--133, New York, NY, USA, 2007. ACM.

Cited By

View all
  • (2023)GraalVM Compiler Benchmark Results Dataset (Data Artifact)Companion of the 2023 ACM/SPEC International Conference on Performance Engineering10.1145/3578245.3585025(65-69)Online publication date: 15-Apr-2023
  • (2018)PAYJIT: space-optimal JIT compilation and its practical implementationProceedings of the 27th International Conference on Compiler Construction10.1145/3178372.3179523(71-81)Online publication date: 24-Feb-2018

Index Terms

  1. Efficient code management for dynamic multi-tiered compilation systems

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PPPJ '14: Proceedings of the 2014 International Conference on Principles and Practices of Programming on the Java platform: Virtual machines, Languages, and Tools
    September 2014
    214 pages
    ISBN:9781450329262
    DOI:10.1145/2647508
    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

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 23 September 2014

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. JVM
    2. code cache
    3. optimization

    Qualifiers

    • Research-article

    Conference

    PPPJ '14
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 29 of 58 submissions, 50%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)13
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 26 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)GraalVM Compiler Benchmark Results Dataset (Data Artifact)Companion of the 2023 ACM/SPEC International Conference on Performance Engineering10.1145/3578245.3585025(65-69)Online publication date: 15-Apr-2023
    • (2018)PAYJIT: space-optimal JIT compilation and its practical implementationProceedings of the 27th International Conference on Compiler Construction10.1145/3178372.3179523(71-81)Online publication date: 24-Feb-2018

    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