Abstract
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.
- Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Jennifer Lhoták, Ondřej Lhoták, Oege de Moor, Damien Sereni, Ganesh Sittampalam, and Julian Tibble. 2005. Abc: An Extensible AspectJ Compiler. In AOSD. 87–98.Google Scholar
- Walter Binder, Jarle Hulaas, and Philippe Moret. 2007. Advanced Java Bytecode Instrumentation. In PPPJ. 135–144. Google Scholar
Digital Library
- Stephen M. Blackburn, Robin Garner, Chris Hoffmann, Asjad M. Khang, Kathryn S. McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z. Guyer, Martin Hirzel, Antony Hosking, Maria Jump, Han Lee, J. Eliot B. Moss, Aashish Phansalkar, Darko Stefanović, Thomas VanDrunen, Daniel von Dincklage, and Ben Wiedermann. 2006. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA. 169–190.Google Scholar
- Eric Bodden, Laurie Hendren, Patrick Lam, Ondřej Lhoták, and Nomair A. Naeem. 2007. Collaborative Runtime Verification with Tracematches. In RV. 22–37. Google Scholar
Cross Ref
- Shigeru Chiba and Muga Nishizawa. 2003. An Easy-to-use Toolkit for Efficient Java Bytecode Translators. In GPCE. 364–376.Google Scholar
- Yanyan Jiang, Chang Xu, and Xiaoxing Ma. 2013. DPAC: An Infrastructure for Dynamic Program Analysis of Concurrency Java Programs. In MDS. 2:1–2:6.Google Scholar
- Dongyun Jin, Patrick O’Neil Meredith, Choonghwan Lee, and Grigore Roşu. 2012. JavaMOP: Efficient Parametric Runtime Monitoring Framework. In ICSE. 1427–1430.Google Scholar
- Milan Jovic and Matthias Hauswirth. 2008. Measuring the Performance of Interactive Applications with Listener Latency Profiling. In PPPJ. 137–146. Google Scholar
Digital Library
- Stephen Kell, Danilo Ansaloni, Walter Binder, and Lukáš Marek. 2012. The JVM is Not Observable Enough (and What to Do About It). In VMIL . 33–38.Google Scholar
- Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. 2001. An overview of AspectJ. In ECOOP. 327–353.Google Scholar
- Lukáš Marek, Alex Villazón, Yudi Zheng, Danilo Ansaloni, Walter Binder, and Zhengwei Qi. 2012. DiSL: A Domain-specific Language for Bytecode Instrumentation. In AOSD. 239–250. Google Scholar
Digital Library
- Nathaniel Nystrom, Michael Clarkson, and Andrew C. Myers. 2003. Polyglot: An extensible compiler framework for Java. In Compiler Construction . Springer Berlin/Heidelberg, 138–152.Google Scholar
- Oracle. 2015. Package java.lang.instrument. https://docs.oracle.com/ javase/8/docs/api/java/lang/instrument/package-summary.html . (2015).Google Scholar
- Oracle. 2015. The Java Language Specification. https://docs.oracle. com/javase/specs/jls/se8/html/index.html . (2015).Google Scholar
- Oracle. 2015. The Java Virtual Machine Specification. http://docs. oracle.com/javase/specs/jvms/se8/html/index.html . (2015).Google Scholar
- Oracle. 2015. The Reflection API. https://docs.oracle.com/javase/ tutorial/reflect/ . (2015).Google Scholar
- OW2 Consortium. 2016. ASM. http://asm.ow2.org/ . (2016).Google Scholar
- Renaud Pawlak. 2006. Spoon: Compile-time Annotation Processing for Middleware. IEEE Distributed Systems Online 7, 11 (2006). Google Scholar
Digital Library
- David J Pearce, Matthew Webster, Robert Berry, and Paul HJ Kelly. 2007. Profiling with AspectJ. Software: Practice and Experience 37, 7 (2007), 747–777.Google Scholar
Digital Library
- Giles Reger, Helena Cuenca Cruz, and David Rydeheard. 2015. MarQ: Monitoring at Runtime with QEA. In TACAS. 596–610.Google Scholar
- Andrea Rosà, Lydia Y. Chen, and Walter Binder. 2016. Actor Profiling in Virtual Execution Environments. SIGPLAN Not. 52, 3 (Oct. 2016), 36–46. Google Scholar
Digital Library
- Simon Kitching. 2013. OSGi Classloading. http://moi.vonos.net/java/ osgi-classloaders/ . (2013).Google Scholar
- The Apache Software Foundation. 2016. BCEL. http://commons. apache.org/bcel/ . (2016).Google Scholar
- The Eclipse Foundation. 2016. AjTypeSystem. https://eclipse.org/ aspectj/doc/next/adk15notebook/reflection.html . (2016).Google Scholar
- Raja Vallée-Rai, Etienne Gagnon, Laurie J. Hendren, Patrick Lam, Patrice Pominville, and Vijay Sundaresan. 2000. Optimizing Java Bytecode Using the Soot Framework: Is It Feasible?. In CC. 18–34.Google Scholar
Index Terms
Accurate reification of complete supertype information for dynamic analysis on the JVM
Recommendations
Accurate reification of complete supertype information for dynamic analysis on the JVM
GPCE 2017: Proceedings of the 16th ACM SIGPLAN International Conference on Generative Programming: Concepts and ExperiencesReflective 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 ...
Turbo DiSL: partial evaluation for high-level bytecode instrumentation
TOOLS'12: Proceedings of the 50th international conference on Objects, Models, Components, PatternsBytecode instrumentation is a key technique for the implementation of dynamic program analysis tools such as profilers and debuggers. Traditionally, bytecode instrumentation has been supported by low-level bytecode engineering libraries that are ...
Introduction to dynamic program analysis with DiSL
Dynamic program analysis (DPA) tools assist in many software engineering and development tasks, such as profiling, program comprehension, and performance model construction and calibration. On the Java platform, many DPA tools are implemented either ...







Comments