Exploring single and multilevel JIT compilation policy for modern machines 1

Dynamic or Just-in-Time (JIT) compilation is essential to achieve high-performance emulation for programs written in managed languages, such as Java and C#. It has been observed that a conservative JIT compilation policy is most effective to obtain good runtime performance without impeding application progress on single-core machines. At the same time, it is often suggested that a more aggressive dynamic compilation strategy may perform best on modern machines that provide abundant computing resources, especially with virtual machines (VMs) that are also capable of spawning multiple concurrent compiler threads. However, comprehensive research on the best JIT compilation policy for such modern processors and VMs is currently lacking. The goal of this work is to explore the properties of single-tier and multitier JIT compilation policies that can enable existing and future VMs to realize the best program performance on modern machines. In this work, we design novel experiments and implement new VM configurations to effectively control the compiler aggressiveness and optimization levels (if and when methods are compiled) in the industry-standard Oracle HotSpot Java VM to achieve this goal. We find that the best JIT compilation policy is determined by the nature of the application and the speed and effectiveness of the dynamic compilers. We extend earlier results showing the suitability of conservative JIT compilation on single-core machines for VMs with multiple concurrent compiler threads. We show that employing the free compilation resources (compiler threads and hardware cores) to aggressively compile more program methods quickly reaches a point of diminishing returns. At the same time, we also find that using the free resources to reduce compiler queue backup (compile selected hot methods early) significantly benefits program performance, especially for slower (highly optimizing) JIT compilers. For such compilers, we observe that accurately prioritizing JIT method compiles is crucial to realize the most performance benefit with the smallest hardware budget. Finally, we show that a tiered compilation policy, although complex to implement, greatly alleviates the impact of more and early JIT compilation of programs on modern machines.

[1]  Christopher A. Vick,et al.  The Java HotSpotTM Server Compiler , 2001 .

[2]  Chandra Krintz Coupling on-line and off-line profile information to improve program performance , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[3]  Chandra Krintz,et al.  Using annotations to reduce dynamic optimization time , 2001, PLDI '01.

[4]  Urs Hölzle,et al.  Reconciling responsiveness with performance in pure object-oriented languages , 1996, TOPL.

[5]  Lieven Eeckhout,et al.  Statistically rigorous java performance evaluation , 2007, OOPSLA.

[6]  Xi Yang,et al.  Looking back on the language and hardware revolutions: measured power, performance, and scaling , 2011, ASPLOS XVI.

[7]  Donald E. Knuth,et al.  An empirical study of FORTRAN programs , 1971, Softw. Pract. Exp..

[8]  Hanspeter Mössenböck,et al.  Design of the Java HotSpot#8482; client compiler for Java 6 , 2008, TACO.

[9]  José Nelson Amaral,et al.  Using machines to learn method-specific compilation strategies , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[10]  WimmerChristian,et al.  Design of the Java HotSpot client compiler for Java 6 , 2008 .

[11]  L. Peter Deutsch,et al.  Efficient implementation of the smalltalk-80 system , 1984, POPL.

[12]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[13]  James E. Smith,et al.  Virtual machines - versatile platforms for systems and processes , 2005 .

[14]  Michael F. P. O'Boyle,et al.  Method-specific dynamic compilation using logistic regression , 2006, OOPSLA '06.

[15]  Daryl Maier,et al.  Experiences with multi-threading and dynamic class loading in a Java just-in-time compiler , 2006, International Symposium on Code Generation and Optimization (CGO'06).

[16]  Tim Harris Controlling run-time compilation , 1998 .

[17]  Scott A. Mahlke,et al.  Using profile information to assist classic code optimizations , 1991, Softw. Pract. Exp..

[18]  Peter M. W. Knijnenburg,et al.  Generating new general compiler optimization settings , 2005, ICS '05.

[19]  Prasad A. Kulkarni,et al.  JIT compilation policy for modern machines , 2011, OOPSLA '11.

[20]  Matthew Arnold,et al.  Adaptive Optimization in the Jalapeo JVM: The Controller's Analytical Model , 2000 .

[21]  Matthew Arnold,et al.  Online feedback-directed optimization of Java , 2002, OOPSLA '02.

[22]  Susan L. Graham,et al.  Gprof: A call graph execution profiler , 1982, SIGPLAN '82.

[23]  Igor Böhm,et al.  Generalized just-in-time trace compilation using a parallel task farm in a dynamic binary translator , 2011, PLDI '11.

[24]  Matthew Arnold,et al.  Adaptive optimization in the Jalapeno JVM , 2000, SIGP.

[25]  Prasad A. Kulkarni,et al.  Performance potential of optimization phase selection during dynamic JIT compilation , 2013, VEE '13.

[26]  Gilbert Joseph Hansen,et al.  Adaptive systems for the dynamic run-time optimization of programs. , 1974 .

[27]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[28]  Prasad A. Kulkarni,et al.  Novel online profiling for virtual machines , 2010, VEE '10.

[29]  Mary Lou Soffa,et al.  An approach for exploring code improving transformations , 1997, TOPL.

[30]  Vivek Sarkar,et al.  Reducing the overhead of dynamic compilation , 2001, Softw. Pract. Exp..

[31]  Matthew Arnold,et al.  A Survey of Adaptive Optimization in Virtual Machines , 2005, Proceedings of the IEEE.

[32]  Nikola Grcevski,et al.  Java Just-in-Time Compiler and Virtual Machine Improvements for Server and Middleware Applications , 2004, Virtual Machine Research and Technology Symposium.

[33]  Prasad A. Kulkarni,et al.  JIT Compilation Policy on Single-Core and Multi-core Machines , 2011, 2011 15th Workshop on Interaction between Compilers and Computer Architectures.

[34]  Dayong Gu,et al.  Phase-based adaptive recompilation in a JVM , 2008, CGO '08.

[35]  Guy L. Steele,et al.  Java(TM) Language Specification , 2005 .

[36]  Cliff Click,et al.  The java hotspot TM server compiler , 2001 .

[37]  David Grove,et al.  Adaptive online context-sensitive inlining , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[38]  Matthew Arnold,et al.  Adaptive optimization in the Jalapeño JVM , 2000, OOPSLA '00.

[39]  Evelyn Duesterwald,et al.  Exploring optimal compilation unit shapes for an embedded just-in-time compiler , 2000 .

[40]  Matthew Arnold,et al.  Dynamic compilation: the benefits of early investing , 2007, VEE '07.