skip to main content
10.1145/1621607.1621622acmconferencesArticle/Chapter ViewAbstractPublication PagesgpceConference Proceedingsconference-collections
research-article

HotWave: creating adaptive tools with dynamic aspect-oriented programming in Java

Published:04 October 2009Publication History

ABSTRACT

Developing 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 development in Java using high-level aspect-oriented programming (AOP). We demonstrate that the use of aspects yields compact tools that are easy to develop and extend. As enabling technology, we rely on HotWave, a new tool for dynamic and comprehensive aspect weaving. HotWave reconciles compatibility with existing virtual machine and AOP technologies. It provides support for runtime adaptation of aspects and reweaving of previously loaded code, as well as the ability to weave aspects into all methods executing in a Java Virtual Machine, including methods in the standard Java class library. HotWave also features a new mechanism for efficiently passing data between advices that are woven into the same method. We demonstrate the benefits of HotWave's distinguishing features with two case studies in the area of profiling.

References

  1. C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhotak, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Adding trace matching with free variables to AspectJ. In OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, pages 345--364, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Aotani and H. Masuhara. SCoPE: an AspectJ compiler for supporting user-defined analysis-based pointcuts. In AOSD '07: Proceedings of the 6th international conference on Aspect-oriented software development, pages 161--172, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Artzi, S. Kim, and M. D. Ernst. ReCrash: Making Software Failures Reproducible by Preserving Object States. In J. Vitek, editor, ECOOP '08: Proceedings of the 22th European Conference on Object-Oriented Programming, volume 5142 of Lecture Notes in Computer Science, pages 542--565, Paphos, Cyprus, 2008. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhotak, O. Lhotak, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Optimising AspectJ. In PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, pages 117--128, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. W. Binder, A. Villazon, M. Schoeberl, and P. Moret. Cache-aware cross-profiling for Java processors. In International Conference on Compilers, Architecture, and Synthesis for Embedded Systems (CASES-2008), pages 127--136, Atlanta, Georgia, USA, Oct. 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Bockisch, M. Haupt, M. Mezini, and K. Ostermann. Virtual machine support for dynamic join points. In AOSD, pages 83--92, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. B. Dufour, L. Hendren, and C. Verbrugge. *J: A tool for dynamic analysis of Java programs. In OOPSLA '03: Companion of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 306--307, New York, NY, USA, 2003. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. JBoss. Javassist Project. Web pages at http://jboss.com/javassist.Google ScholarGoogle Scholar
  14. JBoss. Open source middleware software. Web pages at http://labs.jboss.com/jbossaop/.Google ScholarGoogle Scholar
  15. M. Jovic and M. Hauswirth. Measuring the performance of interactive applications with listener latency profiling. In PPPJ '08: Proceedings of the 6th international symposium on Principles and practice of programming in Java, pages 137--146, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle Scholar
  18. K. Klose, K. Ostermann, and M. Leuschel. Partial evaluation of pointcuts. In PADL, pages 320--334, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P. Moret, W. Binder, D. Ansaloni, and A. Villazon. Visualizing Calling Context Profiles with Ring Charts. In VISSOFT 2009: 5th IEEE International Workshop on Visualizing Software for Understanding and Analysis, Edmonton, Alberta, Canada, Sep. 2009.Google ScholarGoogle ScholarCross RefCross Ref
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. NetBeans. The NetBeans Profiler Project. Web pages at http://profiler.netbeans.org/.Google ScholarGoogle Scholar
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. ObjectWeb. ASM. Web pages at http://asm.objectweb.org/.Google ScholarGoogle Scholar
  24. D. Rothlisberger, M. Harry, A. Villazon, D. Ansaloni, W. Binder, O. Nierstrasz, and P. Moret. Augmenting Static Source Views in IDEs with Dynamic Metrics. In ICSM '09: Proceedings of the 2009 IEEE International Conference on Software Maintenance, Edmonton, Alberta, Canada, 2009.Google ScholarGoogle Scholar
  25. D. Rothlisberger, M. Harry, A. Villazon, D. Ansaloni, W. Binder, O. Nierstrasz, and P. Moret. Senseo: Enriching Eclipse's Static Source View with Dynamic Metrics. In ICSM '09: Proceedings of the 2009 IEEE International Conference on Software Maintenance, Edmonton, Alberta, Canada, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  26. Y. Sato, S. Chiba, and M. Tatsubori. A selective, just-in-time aspect weaver. In GPCE '03: Proceedings of the 2nd international conference on Generative programming and component engineering, pages 189--208, New York, NY, USA, 2003. Springer-Verlag New York, Inc. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. E. Tanter, M. Segura-Devillechaise, J. Noye, and J. Piquer. Altering Java semantics via bytecode manipulation. In Proceedings of the ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering (GPCE 2002), USA, volume 2487 of LNCS, pages 283--298, Oct. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. The Apache Jakarta Project. The Byte Code Engineering Library (BCEL). Web pages at http://jakarta.apache.org/bcel/.Google ScholarGoogle Scholar
  29. E. Tilevich and Y. Smaragdakis. J-Orchestra: Automatic Java Application Partitioning. In ECOOP '02: Proceedings of the 16th European Conference on Object-Oriented Programming, pages 178--204, London, UK, 2002. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Vasseur. Dynamic AOP and RuntimeWeaving for Java - How does AspectWerkz address it? In Dynamic Aspects Workshop (DAW04), Lancaster, England, Mar. 2004.Google ScholarGoogle Scholar
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. J.Walker. Implementing protocols via declarative event patterns. In ACM Sigsoft International Symposium on Foundations of Software Engineering (FSE-12, pages 159--169. ACM Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. HotWave: creating adaptive tools with dynamic aspect-oriented programming in Java

    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

    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!