JIT compilation policy for modern machines

Dynamic or Just-in-Time (JIT) compilation is crucial to achieve acceptable performance for applications (written in managed languages, such as Java and C#) distributed as intermediate language binary codes for a virtual machine (VM) architecture. Since it occurs at runtime, JIT compilation needs to carefully tune its compilation policy to make effective decisions regarding 'if' and 'when' to compile different program regions to achieve the best overall program performance. Past research has extensively tuned JIT compilation policies, but mainly for VMs with a single compiler thread and for execution on single-processor machines. This work is driven by the need to explore the most effective JIT compilation strategies in their modern operational environment, where (a) processors have evolved from single to multi/many cores, and (b) VMs provide support for multiple concurrent compiler threads. Our results confirm that changing 'if' and 'when' methods are compiled have significant performance impacts. We construct several novel configurations in the HotSpot JVM to facilitate this study. The new configurations are necessitated by modern Java benchmarks that impede traditional static whole-program discovery, analysis and annotation, and are required for simulating future many-core hardware that is not yet widely available. We study the effects on performance of increasing compiler aggressiveness for VMs with multiple compiler threads running on existing single/multi-core and future many-core machines. Our results indicate that although more aggressive JIT compilation policies show no benefits on single-core machines, these can often improve program performance for multi/many-core machines. However, accurately prioritizing JIT method compilations is crucial to realize such benefits.

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

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

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

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

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

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

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

[8]  Mira Mezini,et al.  Taming reflection: Aiding static analysis in the presence of reflection and custom class loaders , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[9]  F. Dragan,et al.  Advanced Algorithms , 1995 .

[10]  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.

[11]  Laurie Hendren,et al.  Soot: a Java bytecode optimization framework , 2010, CASCON.

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

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

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

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

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

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

[18]  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).

[19]  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..

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

[21]  James Gosling,et al.  The Java Language Specification, 3rd Edition , 2005 .

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

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

[24]  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.

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

[26]  Richard M. Karp,et al.  On-Line Algorithms Versus Off-Line Algorithms: How Much is it Worth to Know the Future? , 1992, IFIP Congress.

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

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

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

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

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

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

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

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

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