Using hpm-sampling to drive dynamic compilation

All high-performance production JVMs employ an adaptive strategy for program execution. Methods are first executed unoptimized and then an online profiling mechanism is used to find a subset of methods that should be optimized during the same execution. This paper empirically evaluates the design space of several profilers for initiating dynamic compilation and shows that existing online profiling schemes suffer from several limitations. They provide an insufficient number of samples, are untimely, and have limited accuracy at determining the frequently executed methods. We describe and comprehensively evaluate HPM-sampling, a simple but effective profiling scheme for finding optimization candidates using hardware performance monitors (HPMs) that addresses the aforementioned limitations. We show that HPM-sampling is more accurate; has low overhead; and improves performance by 5.7% on average and up to 18.3% when compared to the default system in Jikes RVM, without changing the compiler.

[1]  E. Duesterwald,et al.  Software profiling for hot path prediction: less is more , 2000, SIGP.

[2]  Vivek Sarkar,et al.  The Jikes Research Virtual Machine project: Building an open-source research community , 2005, IBM Syst. J..

[3]  O. Lindholm,et al.  Impact of JIT/JVM optimizations on JAVA application performance , 2003, Seventh Workshop on Interaction Between Compilers and Computer Architectures, 2003. INTERACT-7 2003. Proceedings..

[4]  Cliff Click,et al.  The Java HotSpot Server Compiler , 2001, Java Virtual Machine Research and Technology Symposium.

[5]  Matthew Arnold,et al.  Architecture and policy for adaptive optimization in virtual machines , 2004 .

[6]  V. Barnett,et al.  Applied Linear Statistical Models , 1975 .

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

[8]  James R. Larus,et al.  Exploiting hardware performance counters with flow and context sensitive profiling , 1997, PLDI '97.

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

[10]  Wei-Chung Hsu,et al.  Design and Implementation of a Lightweight Dynamic Optimization System , 2004, J. Instr. Level Parallelism.

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

[12]  Mikko H. Lipasti,et al.  Speculative optimization using hardware-monitored guarded regions for java virtual machines , 2007, VEE '07.

[13]  Zheng Wang,et al.  System support for automatic profiling and optimization , 1997, SOSP.

[14]  Thomas R. Gross,et al.  Online optimizations driven by hardware performance monitoring , 2007, PLDI '07.

[15]  John C. Gyllenhaal,et al.  An Architectural Framework for Runtime Optimization , 2001, IEEE Trans. Computers.

[16]  Lance M. Berc,et al.  Continuous profiling: where have all the cycles gone? , 1997, ACM Trans. Comput. Syst..

[17]  Thomas M. Conte,et al.  Accurate and practical profile-driven compilation using the profile buffer , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

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

[19]  Stephen J. Fink,et al.  The Jalapeño virtual machine , 2000, IBM Syst. J..

[20]  Toshiaki Yasue,et al.  Design and evaluation of dynamic optimizations for a Java just-in-time compiler , 2005, TOPL.

[21]  Mauricio J. Serrano,et al.  Prefetch injection based on hardware monitoring and object metadata , 2004, PLDI '04.

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

[23]  Brian T. Lewis,et al.  The Open Runtime Platform: a flexible high‐performance managed runtime environment , 2005, Concurr. Pract. Exp..

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

[25]  John Whaley,et al.  A portable sampling-based profiler for Java virtual machines , 2000, JAVA '00.

[26]  David K. Tam,et al.  Using Hardware Counters to Improve Dynamic Compilation , 2003 .

[27]  Michael H. Kutner Applied Linear Statistical Models , 1974 .