ABSTRACT
Dynamic aspect-oriented programming (AOP) enables runtime adaptation of aspects, which is important for building sophisticated, aspect-based software engineering tools, such as adaptive profilers or debuggers that dynamically modify instrumentation code in response to user interactions. Today, many AOP frameworks for Java, notably AspectJ, focus on aspect weaving at compile-time or at load-time, and offer only limited support for aspect adaptation and reweaving at runtime. In this paper, we introduce HotWave, an AOP framework based on AspectJ for standard Java Virtual Machines (JVMs). HotWave supports dynamic (re)weaving of previously loaded classes, and it ensures that all classes loaded in a JVM can be (re)woven, including the classes of the standard Java class library. HotWave features a novel mechanism for inter-advice communication, enabling efficient data passing between advices that are woven into the same method. We explain HotWave's programming model and discuss our implementation techniques. As case study, we present an adaptive, aspect-based profiler that leverages HotWave's distinguishing features.
- B. Alpern, C. R. Attanasio, J. J. Barton, B. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. F. Mergen, N. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. C. Shepherd, S. E. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeno virtual machine. IBM Systems Journal, 39(1):211--238, 2000. Google Scholar
Digital Library
- G. Ammons, T. Ball, and J. R. Larus. Exploiting hardware performance counters with flow and context sensitive profiling. In PLDI'97: Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, pages 85--96. ACM Press, 1997. Google Scholar
Digital Library
- P. Avgustinov, A. S. Christensen, L. J. Hendren, S. Kuzins, J. Lhotak, O. Lhotak, O. deMoor, D. Sereni, G. Sittampalam, and J. Tibble. abc: An extensible AspectJ compiler. In AOSD'05: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pages 87--98, New York, NY, USA, 2005. ACM Press. Google Scholar
Digital Library
- L. D. Benavides, R. Douence, and M. Sudholt. Debugging and testing middleware with aspect-based control-flow and causal patterns. In Middleware'08: Proceedings of the 9th ACM/IFIP/USENIX International Conference on Middleware, pages 183--202, New York, NY, USA, 2008. Springer-Verlag New York, Inc. Google Scholar
Digital Library
- A. Bergel. FacetS: First class entities for an open dynamic AOP language. In Proceedings of the Open and Dynamic Aspect Languages Workshop, Mar. 2006.Google Scholar
- W. Binder and J. Hulaas. Flexible and efficient measurement of dynamic bytecode metrics. In Fifth International Conference on Generative Programming and Component Engineering (GPCE-2006), pages 171--180, Portland, Oregon, USA, Oct. 2006. ACM. Google Scholar
Digital Library
- W. Binder, J. Hulaas, and P. Moret. Advanced Java Bytecode Instrumentation. In PPPJ'07: Proceedings of the 5th International Symposium on Principles and Practice of Programming in Java, pages 135--144, New York, NY, USA, 2007. ACM Press. Google Scholar
Digital Library
- W. Binder, J. Hulaas, P.Moret, and A. Villazon. Platform-independent profiling in a virtual execution environment. Software: Practice and Experience, 39(1):47--79, 2009. http://dx.doi.org/10.1002/spe.890. Google Scholar
Digital Library
- C. Bockisch, M. Haupt, M. Mezini, and K. Ostermann. Virtual machine support for dynamic join points. In AOSD, pages 83--92, 2004. Google Scholar
Digital Library
- S. Chiba, Y. Sato, and M. Tatsubori. Using Hotswap for Implementing Dynamic AOP Systems. In 1st Workshop on Advancing the State-of-the-Art in Run-time Inspection, 2003.Google Scholar
- M. Dmitriev. Profiling Java applications using code hotswapping and dynamic call graph revelation. In WOSP'04: Proceedings of the Fourth International Workshop on Software and Performance, pages 139--150. ACM Press, 2004. Google Scholar
Digital Library
- J. Gosling, B. Joy, G. L. Steele, and G. Bracha. The Java Language Specification, Third Edition. The Java Series. Addison-Wesley, 2005. Google Scholar
Digital Library
- E. Hilsdale and J. Hugunin. Advice weaving in AspectJ. In AOSD'04: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pages 26--35, New York, NY, USA, 2004. ACM. Google Scholar
Digital Library
- R. Hirschfeld. AspectS - Aspect-Oriented Programming with Squeak. In NODe'02: Revised Papers from the International Conference NetObjectDays on Objects, Components, Architectures, Services, and Applications for a Networked World, pages 216--232, London, UK, 2003. Springer-Verlag. Google Scholar
Digital Library
- JBoss. Javassist Project. Web pages at http://jboss.com/javassist/.Google Scholar
- JBoss. Open source middleware software. Web pages at http://labs.jboss.com/jbossaop/.Google Scholar
- G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In J. L. Knudsen, editor, Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP-2001), volume 2072 of Lecture Notes in Computer Science, pages 327--353, 2001. Google Scholar
Digital Library
- G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In M. Aksit and S. Matsuoka, editors, Proceedings of European Conference on Object-Oriented Programming, volume 1241, pages 220--242. Springer-Verlag, Berlin, Heidelberg, and New York, 1997.Google Scholar
- J. Manson, W. Pugh, and S. V. Adve. The Java Memory Model. In POPL'05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 378--391, New York, NY, USA, 2005. ACM. Google Scholar
Digital Library
- H. Masuhara, G. Kiczales, and C. Dutchyn. A compilation and optimization model for aspect-oriented programs. In Compiler Construction, volume 2622 of Springer Lecture Notes in Computer Science, pages 46--60. Springer, 2003. Google Scholar
Digital Library
- P. Moret, W. Binder, and A. Villazon. CCCP: Complete calling context profiling in virtual execution environments. In PEPM'09: Proceedings of the 2009 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, pages 151--160, Savannah, GA, USA, 2009. ACM. Google Scholar
Digital Library
- NetBeans. The NetBeans Profiler Project. Web pages at http://profiler.netbeans.org/.Google Scholar
- A. Nicoara and G. Alonso. Making applications persistent at runtime. International Conference on Data Engineering, 15:1368--1372, 2007.Google Scholar
Cross Ref
- A. Nicoara, G. Alonso, and T. Roscoe. Controlled, Systematic, and Efficient Code Replacement for Running Java Programs. In Eurosys'08: Proceedings of the 3rd ACMSIGOPS/EuroSys European Conference on Computer Systems 2008, pages 233--246, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- OSGi Alliance. OSGi Alliance Specifications. Web pages at http://www.osgi.org/Specifications/.Google Scholar
- R. Pawlak, L. Seinturier, L. Duchien, G. Florin, F. Legond-Aubry, and L. Martelli. JAC: An Aspect-based Distributed Dynamic Framework. Softw. Pract. Exper., 34(12):1119--1148, 2004. Google Scholar
Digital Library
- D. J. Pearce, M. Webster, R. Berry, and P. H. J. Kelly. Profiling with AspectJ. Software: Practice and Experience, 37(7):747--777, June 2007. Google Scholar
Digital Library
- A. Popovici, G. Alonso, and T. Gross. Just-in-time aspects: efficient dynamic weaving for Java. In AOSD'03: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pages 100--109, New York, NY, USA, 2003. ACM Press. Google Scholar
Digital Library
- A. Popovici, T. Gross, and G. Alonso. Dynamic weaving for aspect-oriented programming. In AOSD'02: Proceedings of the 1st international conference on Aspect-oriented software development, pages 141--147, New York, NY, USA, 2002. ACM Press. Google Scholar
Digital Library
- SunMicrosystems, Inc. Java Platform Debugger Architecture (JDPA). Web pages at http://java.sun.com/javase/technologies/core/toolsapis/jpda/.Google Scholar
- Sun Microsystems, Inc. JVM Tool Interface (JVMTI) version 1.1. Web pages at http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html.Google Scholar
- W. Vanderperren, D. Suvee, B. Verheecke, M. A. Cibran, and V. Jonckers. Adaptive Programming in JAsCo. In AOSD'05: Proceedings of the 4th international conference on Aspect-oriented software development, pages 75--86, New York, NY, USA, 2005. ACM. Google Scholar
Digital Library
- A. Vasseur. Dynamic AOP and RuntimeWeaving for Java - How does AspectWerkz address it? In Dynamic Aspects Workshop (DAW04), Lancaster, England, Mar. 2004.Google Scholar
- A. Villazon, W. Binder, and P. Moret. Aspect Weaving in Standard Java Class Libraries. In PPPJ'08: Proceedings of the 6th International Symposium on Principles and Practice of Programming in Java, pages 159--167, New York, NY, USA, Sept. 2008. ACM. Google Scholar
Digital Library
- A. Villazon, W. Binder, and P. Moret. Flexible Calling Context Reification for Aspect-Oriented Programming. In AOSD'09: Proceedings of the 8th International Conference on Aspect-oriented Software Development, pages 63--74, Charlottesville, Virginia, USA, Mar. 2009. ACM. Google Scholar
Digital Library
- X. Zhuang, M. J. Serrano, H. W. Cain, and J.-D. Choi. Accurate, efficient, and adaptive calling context profiling. In PLDI'06: Proceedings of the 2006 ACMSIGPLAN conference on Programming language design and implementation, pages 263--271, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
Index Terms
Advanced runtime adaptation for Java
Recommendations
HotWave: creating adaptive tools with dynamic aspect-oriented programming in Java
GPCE '09: Proceedings of the eighth international conference on Generative programming and component engineeringDeveloping tools for profiling, debugging, testing, and reverse engineering is error-prone, time-consuming, and therefore costly when using low-level techniques, such as bytecode instrumentation. As a solution to these problems, we promote tool ...
Advanced runtime adaptation for Java
GPCE '09Dynamic aspect-oriented programming (AOP) enables runtime adaptation of aspects, which is important for building sophisticated, aspect-based software engineering tools, such as adaptive profilers or debuggers that dynamically modify instrumentation code ...
Dynamic aspect-oriented programming in java: the hotwave experience
Transactions on Aspect-Oriented Software Development IXDynamic aspect-oriented programming (AOP) enables runtime adaptation of programs. It enables sophisticated, aspect-based software engineering tools, such as adaptive profilers or debuggers, which dynamically modify instrumentation code in response to ...







Comments