skip to main content
article
Open Access

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

Published:23 October 2017Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle Scholar
  2. Walter Binder, Jarle Hulaas, and Philippe Moret. 2007. Advanced Java Bytecode Instrumentation. In PPPJ. 135–144. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarCross RefCross Ref
  5. Shigeru Chiba and Muga Nishizawa. 2003. An Easy-to-use Toolkit for Efficient Java Bytecode Translators. In GPCE. 364–376.Google ScholarGoogle Scholar
  6. 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 ScholarGoogle Scholar
  7. Dongyun Jin, Patrick O’Neil Meredith, Choonghwan Lee, and Grigore Roşu. 2012. JavaMOP: Efficient Parametric Runtime Monitoring Framework. In ICSE. 1427–1430.Google ScholarGoogle Scholar
  8. Milan Jovic and Matthias Hauswirth. 2008. Measuring the Performance of Interactive Applications with Listener Latency Profiling. In PPPJ. 137–146. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. 2001. An overview of AspectJ. In ECOOP. 327–353.Google ScholarGoogle Scholar
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle Scholar
  13. Oracle. 2015. Package java.lang.instrument. https://docs.oracle.com/ javase/8/docs/api/java/lang/instrument/package-summary.html . (2015).Google ScholarGoogle Scholar
  14. Oracle. 2015. The Java Language Specification. https://docs.oracle. com/javase/specs/jls/se8/html/index.html . (2015).Google ScholarGoogle Scholar
  15. Oracle. 2015. The Java Virtual Machine Specification. http://docs. oracle.com/javase/specs/jvms/se8/html/index.html . (2015).Google ScholarGoogle Scholar
  16. Oracle. 2015. The Reflection API. https://docs.oracle.com/javase/ tutorial/reflect/ . (2015).Google ScholarGoogle Scholar
  17. OW2 Consortium. 2016. ASM. http://asm.ow2.org/ . (2016).Google ScholarGoogle Scholar
  18. Renaud Pawlak. 2006. Spoon: Compile-time Annotation Processing for Middleware. IEEE Distributed Systems Online 7, 11 (2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. Giles Reger, Helena Cuenca Cruz, and David Rydeheard. 2015. MarQ: Monitoring at Runtime with QEA. In TACAS. 596–610.Google ScholarGoogle Scholar
  21. Andrea Rosà, Lydia Y. Chen, and Walter Binder. 2016. Actor Profiling in Virtual Execution Environments. SIGPLAN Not. 52, 3 (Oct. 2016), 36–46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Simon Kitching. 2013. OSGi Classloading. http://moi.vonos.net/java/ osgi-classloaders/ . (2013).Google ScholarGoogle Scholar
  23. The Apache Software Foundation. 2016. BCEL. http://commons. apache.org/bcel/ . (2016).Google ScholarGoogle Scholar
  24. The Eclipse Foundation. 2016. AjTypeSystem. https://eclipse.org/ aspectj/doc/next/adk15notebook/reflection.html . (2016).Google ScholarGoogle Scholar
  25. 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 ScholarGoogle Scholar

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 52, Issue 12
      GPCE '17
      December 2017
      258 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3170492
      Issue’s Table of Contents
      • cover image ACM Conferences
        GPCE 2017: Proceedings of the 16th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
        October 2017
        258 pages
        ISBN:9781450355247
        DOI:10.1145/3136040

      Copyright © 2017 Owner/Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 23 October 2017

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!