Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Adaptive multi-level compilation in a trace-based Java JIT compiler

Published: 19 October 2012 Publication History

Abstract

This paper describes our multi-level compilation techniques implemented in a trace-based Java JIT compiler (trace-JIT). Like existing multi-level compilation for method-based compilers, we start JIT compilation with a small compilation scope and a low optimization level so the program can start running quickly. Then we identify hot paths with a timer-based sampling profiler, generate long traces that capture the hot paths, and recompile them with a high optimization level to improve the peak performance. A key to high performance is selecting long traces that effectively capture the entire hot paths for upgrade recompilations. To do this, we introduce a new technique to generate a directed graph representing the control flow, a TTgraph, and use the TTgraph in the trace selection engine to efficiently select long traces. We show that our multi-level compilation improves the peak performance of programs by up to 58.5% and 22.2% on average compared to compiling all of the traces only at a low optimization level. Comparing the performance with our multi-level compilation to the performance when compiling all of the traces at a high optimization level, our technique can reduce the startup times of programs by up to 61.1% and 31.3% on average without significant reduction in the peak performance. Our results show that our adaptive multi-level compilation can balance the peak performance and startup time by taking advantage of different optimization levels.

References

[1]
P. Wu, H. Hayashizaki, H. Inoue, and T. Nakatani, "Reducing Trace Selection Footprint for Large-scale Java Applications with no Performance Loss", in Proceedings of the ACM Object-Oriented Programming, Systems, Languages & Applications, pp. 789--804, 2011.
[2]
M. Paleczny, C. Vick, and C. Click, "The Java Hotspot(tm) Server Compiler", in Proceedings of the USENIX Java Virtual Machine Research and Technology Symposium, pp. 1--12, 2001.
[3]
N. Grcevski, A. Kielstra, K. Stoodley, M. Stoodley, and V. Sundaresan. "Java just-in-time compiler and virtual machine improvements for server and middleware applications". In Proceedings of the USENIX Virtual Machine Research and Technology Symposium, pp. 151--162, 2004.
[4]
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 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 180--195, 2001.
[5]
M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. "Adaptive optimization in the Jalapeño JVM", in Proceedings of the ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications. pp. 47--65. 2000.
[6]
H. Inoue, H. Hayashizaki, P. Wu, and T. Nakatani, "A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler", in Proceedings of the International Symposium on Code Generation and Optimization, pp. 246--256, 2011.
[7]
V. Bala, E. Duesterwald, and S. Banerjia, "Dynamo: A Transparent Runtime Optimization System," in Proceedings of the ACM Programming Language Design and Implementation, pp. 1--12, 2000.
[8]
T. Mytkowicz, A. Diwan, M. Hauswirth, and P. F. Sweeney. "Evaluating the accuracy of Java profilers", in Proceedings of the ACM SIGPLAN conference on Programming language design and implementation. pp. 1879--197, 2010.
[9]
M. Hirzel, and T. M. Chilimbi, "Bursty tracing: a framework for low-overhead temporal profiling", in Proceedings of the 4th Workshop on Feedback-Directed and Dynamic Optimization, pp. 117--126, 2001.
[10]
H. Hayashizaki, P. Wu, H. Inoue, M. Serrano, and T. Nakatani, "Improving the Performance of Trace-based Systems by False Loop Filtering", In Proceedings of Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 405--418, 2011.
[11]
H. Q. Le, W. J. Starke, J. S. Fields, F. P. O'Connell, D. Q. Nguyen, B. J. Ronchetti, W. M. Sauer, E. M. Schwarz, and M. T. Vaden. "IBM POWER6 microarchitecture". IBM Journal of Research and Development, Vol. 51 (6), pp. 639--662, 2007.
[12]
S. M. Blackburn et al., "The DaCapo Benchmarks: Java Benchmarking Development and Analysis", in Proceedings of the ACM conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 169--190, 2006.
[13]
U. Holzle and D. Ungar, "A third generation self implementation: Reconciling responsiveness with performance", in Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 229--243, 1994.
[14]
C. Bolz, A. Cuni, M. Fijalkowski, and A. Rigo, "Tracing the Meta-Level: PyPy's Tracing JIT Compiler", in Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems, pp. 18--25, 2009.
[15]
A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz., "Trace-based Just-In-Time Type Specialization for Dynamic Languages", in Proceedings of the ACM SIGPLAN conference on Programming language design and implementation, pp. 465--478, 2009.
[16]
A. Gal, C. Probst, and M. Franz, "HotPathVM: An Effective JIT Compiler for Resource-constrained Devices", in Proceedings of the International Conference on Virtual Execution Environments, pp. 144--153, 2006.
[17]
B. Cheng and B. Buzbee, "A JIT Compiler for Android's Dalvik VM", Google I/O developer conference, 2010. http://www.google.com/events/io/2010/sessions/jit-compiler-androids-dalvik-vm.html
[18]
C. Häubl and H. Mössenböck, "Trace-based Compilation for the Java HotSpot Virtual Machine", in Proceedings of the International Conference on the Principles and Practice of Programming in Java, pp. 129--138, 2011.
[19]
C. Häubl, C. Wimmer, and H. Mössenböck, "Evaluation of trace inlining heuristics for Java", in Proceedings of the Annual ACM Symposium on Applied Computing, pp. 1971--1876, 2011.
[20]
A. Gal, "Efficient bytecode verification and compilation in a virtual machine", PhD thesis, University of California, Irvine, 2006.
[21]
M. Bebenita, F. Brandner, M. Fahndrich, F. Logozzo, W. Schulte, N. Tillmann, and H. Venter, "SPUR: A trace-based JIT compiler for CIL", in Proceedings of the ACM international conference on Object oriented programming systems languages and applications, pp. 708--725, 2010.
[22]
M. Bebenita, M. Chang, G. Wagner, A. Gal, C. Wimmer, and M. Franz, "Trace-based compilation in execution environments without interpreters", in Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java, pp. 59--68, 2010.

Cited By

View all
  • (2024)Accelerate RISC-V Instruction Set Simulation by Tiered JIT CompilationProceedings of the 16th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3689490.3690399(12-22)Online publication date: 17-Oct-2024
  • (2020)Representing and reasoning about dynamic codeProceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering10.1145/3324884.3416542(312-323)Online publication date: 21-Dec-2020
  • (2023)Torchy: A Tracing JIT Compiler for PyTorchProceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction10.1145/3578360.3580266(98-109)Online publication date: 17-Feb-2023
  • Show More Cited By

Index Terms

  1. Adaptive multi-level compilation in a trace-based Java JIT compiler

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 47, Issue 10
    OOPSLA '12
    October 2012
    1011 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2398857
    Issue’s Table of Contents
    • cover image ACM Conferences
      OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
      October 2012
      1052 pages
      ISBN:9781450315616
      DOI:10.1145/2384616
    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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 19 October 2012
    Published in SIGPLAN Volume 47, Issue 10

    Check for updates

    Author Tags

    1. JAVA
    2. jit compiler
    3. profiling
    4. trace selection and compilation

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)18
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 01 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Accelerate RISC-V Instruction Set Simulation by Tiered JIT CompilationProceedings of the 16th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3689490.3690399(12-22)Online publication date: 17-Oct-2024
    • (2020)Representing and reasoning about dynamic codeProceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering10.1145/3324884.3416542(312-323)Online publication date: 21-Dec-2020
    • (2023)Torchy: A Tracing JIT Compiler for PyTorchProceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction10.1145/3578360.3580266(98-109)Online publication date: 17-Feb-2023
    • (2020)Representing and reasoning about dynamic codeProceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering10.1145/3324884.3416542(312-323)Online publication date: 21-Dec-2020
    • (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
    • (2016)CAOSProceedings of the ACM International Conference on Computing Frontiers10.1145/2903150.2903151(110-118)Online publication date: 16-May-2016
    • (2015)Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromisesACM SIGPLAN Notices10.1145/2813885.273796350:6(545-554)Online publication date: 3-Jun-2015
    • (2015)Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromisesProceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2737924.2737963(545-554)Online publication date: 3-Jun-2015
    • (2013)Improving dynamic binary optimization through early-exit guided code region formationACM SIGPLAN Notices10.1145/2517326.245151948:7(23-32)Online publication date: 16-Mar-2013
    • (2013)Improving dynamic binary optimization through early-exit guided code region formationProceedings of the 9th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments10.1145/2451512.2451519(23-32)Online publication date: 16-Mar-2013

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media