Portable and accurate sampling profiling for Java

This article presents a novel framework for the sampling‐based profiling of Java programs, which relies on program transformation techniques. We exploit bytecode instruction counting to regularly activate a user‐defined profiling agent, which processes the current call stack. This approach has several advantages, such as making the instrumentation entirely portable, generating reproducible profiles, and enabling a fine‐grained adjustment of the sampling rate. Our framework offers a flexible API to write portable profiling agents in pure Java. While the overhead due to our profiling scheme is comparable to the overhead caused by prevailing, timing‐based profilers, the resulting profiles are much more accurate. Copyright © 2006 John Wiley & Sons, Ltd.

[1]  Jong-Deok Choi,et al.  Efficient and precise modeling of exceptions for the analysis of Java programs , 1999, PASTE '99.

[2]  Sheng Liang,et al.  Comprehensive Profiling Support in the Java Virtual Machine , 1999, COOTS.

[3]  Walter Binder,et al.  Exact and Portable Profiling for the JVM Using Bytecode Instruction Counting , 2006, QAPL.

[4]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[5]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[6]  James M. Stichnoth,et al.  Practicing JUDO: Java under dynamic optimizations , 2000, PLDI '00.

[7]  Walter Binder,et al.  Program transformations for portable CPU accounting and control in Java , 2004, PEPM '04.

[8]  Matthias Hauswirth,et al.  Vertical profiling: understanding the behavior of object-priented applications , 2004, OOPSLA.

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

[10]  Andreas Krall,et al.  Efficient JavaVM just-in-time compilation , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

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

[12]  Éric Tanter,et al.  Altering Java Semantics via Bytecode Manipulation , 2002, GPCE.

[13]  Dick A. C. Quartel,et al.  Performance monitoring of java applications , 2002, WOSP '02.

[14]  Shigeru Chiba,et al.  Load-Time Structural Reflection in Java , 2000, ECOOP.

[15]  Mikhail Dmitriev Profiling Java applications using code hotswapping and dynamic call graph revelation , 2004, WOSP '04.

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

[17]  James R. Larus,et al.  Rewriting executable files to measure program behavior , 1994, Softw. Pract. Exp..

[18]  Walter Binder,et al.  A portable CPU-management framework for Java , 2004, IEEE Internet Computing.

[19]  Toshio Nakatani,et al.  A study of exception handling and its dynamic optimization in Java , 2001, OOPSLA '01.

[20]  Matthew Arnold,et al.  A framework for reducing the cost of instrumented code , 2001, PLDI '01.

[21]  James David Turner A dynamic prediction and monitoring framework for distributed applications , 2003 .

[22]  Markus Dahm,et al.  Byte Code Engineering , 1999, Java-Informations-Tage.

[23]  James R. Larus,et al.  Optimally profiling and tracing programs , 1992, POPL '92.

[24]  Walter Binder,et al.  Portable resource control in Java , 2001, OOPSLA '01.

[25]  Matthias Hauswirth,et al.  Using Hardware Performance Monitors to Understand the Behavior of Java Applications , 2004, Virtual Machine Research and Technology Symposium.

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

[27]  Peter Feller,et al.  Value Profiling for Instructions and Memory Locations , 1998 .

[28]  Brian F. Cooper,et al.  ProfBuilder: A Package for Rapidly Building Java Execution Prolers , 1998 .

[29]  Laurie J. Hendren,et al.  Dynamic metrics for java , 2003, OOPSLA '03.