ByCounter: Portable Runtime Counting of Bytecode Instructions and Method Invocations

For bytecode-based applications, runtime instruction counts can be used as a platform-independent application execution metric, and also can serve as the basis for bytecode-based performance prediction. However, dierent instruction types have dierent execution durations, so they must be counted separately, and method invocations should be identified and counted because of their substantial contribution to the total application performance. For Java bytecode, most JVMs and profilers do not provide such functionality at all, and existing bytecode analysis frameworks require expensive JVM instrumentation for instruction-level counting. In this paper, we present ByCounter, a lightweight approach for exact runtime counting of executed bytecode instructions and method invocations. ByCounter significantly reduces total counting costs by instrumenting only the application bytecode and not the JVM, and it can be used without modifications on any JVM. We evaluate the presented approach by successfully applying it to multiple Java applications on dierent JVMs, and discuss the runtime costs of applying ByCounter to these

[1]  Jooyong Lee,et al.  Program Validation by Symbolic and Reverse Execution , 2007 .

[2]  Walter Binder,et al.  Advanced Java bytecode instrumentation , 2007, PPPJ.

[3]  John Steven,et al.  jRapture: A Capture/Replay tool for observation-based testing , 2000, ISSTA '00.

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

[5]  Lieven Eeckhout,et al.  Javana: a system for building customized Java program analysis tools , 2006, OOPSLA '06.

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

[7]  Jack J. Dongarra,et al.  The LINPACK Benchmark: past, present and future , 2003, Concurr. Comput. Pract. Exp..

[8]  Steffen Becker,et al.  Model-Based performance prediction with the palladio component model , 2007, WOSP '07.

[9]  Steffen Becker,et al.  Predicting Software Component Performance : On the Relevance of Parameters for Benchmarking Bytecode and APIs , 2007 .

[10]  Michael Philippsen,et al.  JavaGrande - High Performance Computing with Java , 2000, PARA.

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

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

[13]  Jack Donnell Java * Performance Profiling using the VTune TM Performance Analyzer , 2004 .

[14]  D. B. Davis,et al.  Sun Microsystems Inc. , 1993 .

[15]  Akira Fukuda,et al.  A Case Study of Development of a Java Bytecode Analyzer Framework Using AspectJ , 2005 .

[16]  Walter Binder,et al.  Using Bytecode Instruction Counting as Portable CPU Consumption Metric , 2006, Electron. Notes Theor. Comput. Sci..

[17]  Viktor Schuppan,et al.  JVM Independent Replay in Java , 2005, Electron. Notes Theor. Comput. Sci..

[18]  Thierry Coupaye,et al.  ASM: a code manipulation tool to implement adaptable systems , 2002 .

[19]  Laurie Hendren,et al.  Soot---a java optimization framework , 1999 .