MAJOR: AN ASPECT WEAVER WITH FULL COVERAGE SUPPORT

Prevailing Aspect-Oriented Programming (AOP) frameworks for Java, such as AspectJ, use bytecode instrumentation techniques to weave aspects into application code. Unfortunately, those frameworks do not support weaving in the Java class library. When implementing aspect-based tools, such as profilers, debugger, or dynamic program analysis tools in general, the aforementioned restriction becomes an important limitation for successfully applying AOP. In this article we present MAJOR, an aspect weaver with full coverage support. That is, MAJOR ensures that aspects are woven into all classes loaded in a Java Virtual Machine, including those in the standard Java class library. We describe the intricacies of instrumentation of the Java class library and present an extended instrumentation approach allowing the user to choose between a pure Java weaving solution based on a two-phases instrumentation scheme, or a single-phase one requiring a tiny native code layer. The single-phase approach allows to better isolate the weaving process from the execution of the woven code.

[1]  Walter Binder,et al.  Aspect weaving in standard Java class libraries , 2008, PPPJ '08.

[2]  Michael D. Ernst,et al.  ReCrash: Making Software Failures Reproducible by Preserving Object States , 2008, ECOOP.

[3]  Hanspeter Mössenböck,et al.  Safe and atomic run-time code evolution for Java and its application to dynamic AOP , 2011, OOPSLA '11.

[4]  Atanas Rountev,et al.  Precise memory leak detection for java software using container profiling , 2013, 2008 ACM/IEEE 30th International Conference on Software Engineering.

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

[6]  Gustavo Alonso,et al.  Just-in-time aspects: efficient dynamic weaving for Java , 2003, AOSD '03.

[7]  Éric Tanter Execution levels for aspect-oriented programming , 2010, AOSD.

[8]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[9]  Walter Binder,et al.  Comprehensive aspect weaving for Java , 2011, Sci. Comput. Program..

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

[11]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.

[12]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[13]  Hanspeter Mössenböck,et al.  Improving aspect-oriented programming with dynamic code evolution in an enhanced Java virtual machine , 2010, RAM-SE@ECOOP.

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

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

[16]  Monica S. Lam,et al.  Static detection of leaks in polymorphic containers , 2006, ICSE '06.

[17]  Michael Eichberg,et al.  An execution layer for aspect-oriented programming languages , 2005, VEE '05.

[18]  Hanspeter Mössenböck,et al.  Applications of enhanced dynamic code evolution for Java in GUI development and dynamic aspect-oriented programming , 2010, GPCE '10.

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

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

[21]  Stéphane Ducasse,et al.  Runtime bytecode transformation for Smalltalk , 2006, Comput. Lang. Syst. Struct..

[22]  Walter Binder,et al.  Polymorphic bytecode instrumentation , 2011, AOSD '11.

[23]  Walter Binder,et al.  Advanced runtime adaptation for Java , 2009, GPCE '09.

[24]  Assaf Schuster,et al.  Instrumentation of standard libraries in object-oriented languages: the twin class hierarchy approach , 2004, OOPSLA '04.

[25]  Yannis Smaragdakis,et al.  Transparent program transformations in the presence of opaque code , 2006, GPCE '06.

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