Accurate reification of complete supertype information for dynamic analysis on the JVM

Reflective supertype information (RSI) is useful for many instrumentation-based dynamic analyses on the Java Virtual Machine (JVM). On the one hand, while such information can be obtained when performing the instrumentation within the same JVM process executing the instrumented program, in-process instrumentation severely limits the code coverage of the analysis. On the other hand, performing the instrumentation in a separate process can achieve full code coverage, but complete RSI is generally not available, often requiring expensive runtime checks in the instrumented program. Providing accurate and complete RSI in the instrumentation process is challenging because of dynamic class loading and classloader namespaces. In this paper, we present a novel technique to accurately reify complete RSI in a separate instrumentation process. We implement our technique in the dynamic analysis framework DiSL and evaluate it on a task profiler, achieving speedups of up to 45% for an analysis with full code coverage.

[1]  Laurie J. Hendren,et al.  Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? , 2000, CC.

[2]  Grigore Rosu,et al.  JavaMOP: Efficient parametric runtime monitoring framework , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[3]  Walter Binder,et al.  DiSL: a domain-specific language for bytecode instrumentation , 2012, AOSD.

[4]  Ondrej Lhoták,et al.  abc: an extensible AspectJ compiler , 2005, AOSD '05.

[5]  Ondrej Lhoták,et al.  Collaborative Runtime Verification with Tracematches , 2010, J. Log. Comput..

[6]  Xiaoxing Ma,et al.  DPAC: an infrastructure for dynamic program analysis of concurrency Java programs , 2013, MDS '13.

[7]  Muga Nishizawa,et al.  An Easy-to-Use Toolkit for Efficient Java Bytecode Translators , 2003, GPCE.

[8]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

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

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

[11]  Walter Binder,et al.  The JVM is not observable enough (and what to do about it) , 2012, VMIL '12.

[12]  David E. Rydeheard,et al.  MarQ: Monitoring at Runtime with QEA , 2015, TACAS.

[13]  Andrea Rosà,et al.  Actor profiling in virtual execution environments , 2016, GPCE.

[14]  Renaud Pawlak Spoon: Compile-time Annotation Processing for Middleware , 2006, IEEE Distributed Systems Online.

[15]  Paul H. J. Kelly,et al.  Profiling with AspectJ , 2007, Softw. Pract. Exp..

[16]  Matthias Hauswirth,et al.  Measuring the performance of interactive applications with listener latency profiling , 2008, PPPJ '08.

[17]  Michael R. Clarkson,et al.  Polyglot: An Extensible Compiler Framework for Java , 2003, CC.

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

[19]  Other Contributors Are Indicated Where They Contribute The Eclipse Foundation , 2017 .

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