skip to main content
research-article

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

Published:19 October 2012Publication History
Skip Abstract Section

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.htmlGoogle ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Gal, "Efficient bytecode verification and compilation in a virtual machine", PhD thesis, University of California, Irvine, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • 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

      Copyright © 2012 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 October 2012

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!