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

Advanced runtime adaptation for Java

Published: 04 October 2009 Publication History

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.

References

[1]
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.
[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.
[3]
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.
[4]
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.
[5]
A. Bergel. FacetS: First class entities for an open dynamic AOP language. In Proceedings of the Open and Dynamic Aspect Languages Workshop, Mar. 2006.
[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.
[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.
[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.
[9]
C. Bockisch, M. Haupt, M. Mezini, and K. Ostermann. Virtual machine support for dynamic join points. In AOSD, pages 83--92, 2004.
[10]
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.
[11]
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.
[12]
J. Gosling, B. Joy, G. L. Steele, and G. Bracha. The Java Language Specification, Third Edition. The Java Series. Addison-Wesley, 2005.
[13]
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.
[14]
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.
[15]
JBoss. Javassist Project. Web pages at http://jboss.com/javassist/.
[16]
JBoss. Open source middleware software. Web pages at http://labs.jboss.com/jbossaop/.
[17]
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.
[18]
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.
[19]
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.
[20]
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.
[21]
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.
[22]
NetBeans. The NetBeans Profiler Project. Web pages at http://profiler.netbeans.org/.
[23]
A. Nicoara and G. Alonso. Making applications persistent at runtime. International Conference on Data Engineering, 15:1368--1372, 2007.
[24]
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.
[25]
OSGi Alliance. OSGi Alliance Specifications. Web pages at http://www.osgi.org/Specifications/.
[26]
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.
[27]
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.
[28]
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.
[29]
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.
[30]
SunMicrosystems, Inc. Java Platform Debugger Architecture (JDPA). Web pages at http://java.sun.com/javase/technologies/core/toolsapis/jpda/.
[31]
Sun Microsystems, Inc. JVM Tool Interface (JVMTI) version 1.1. Web pages at http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html.
[32]
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.
[33]
A. Vasseur. Dynamic AOP and RuntimeWeaving for Java - How does AspectWerkz address it? In Dynamic Aspects Workshop (DAW04), Lancaster, England, Mar. 2004.
[34]
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.
[35]
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.
[36]
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.

Cited By

View all
  • (2019)A hybrid approach for resource-based comparison of adaptable Java applicationsScience of Computer Programming10.1016/j.scico.2012.01.00578:8(987-1009)Online publication date: 1-Jan-2019
  • (2015)Polymorphic bytecode instrumentationSoftware: Practice and Experience10.1002/spe.238546:10(1351-1380)Online publication date: 18-Dec-2015
  • (2013)Dynamic optimization of bytecode instrumentationProceedings of the 7th ACM workshop on Virtual machines and intermediate languages10.1145/2542142.2542145(21-30)Online publication date: 28-Oct-2013
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
GPCE '09: Proceedings of the eighth international conference on Generative programming and component engineering
October 2009
194 pages
ISBN:9781605584942
DOI:10.1145/1621607
  • General Chair:
  • Jeremy Siek,
  • Program Chair:
  • Bernd Fischer
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 2
    GPCE '09
    February 2010
    182 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1837852
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 October 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AspectJ
  2. bytecode instrumentation
  3. code hotswapping
  4. dynamic aspect-oriented programming
  5. java virtual machine
  6. runtime aspect adaptation and (re)weaving

Qualifiers

  • Research-article

Conference

GPCE'09
Sponsor:
GPCE'09: Generative Programming and Component Engineering
October 4 - 5, 2009
Colorado, Denver, USA

Acceptance Rates

GPCE '09 Paper Acceptance Rate 18 of 62 submissions, 29%;
Overall Acceptance Rate 56 of 180 submissions, 31%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2019)A hybrid approach for resource-based comparison of adaptable Java applicationsScience of Computer Programming10.1016/j.scico.2012.01.00578:8(987-1009)Online publication date: 1-Jan-2019
  • (2015)Polymorphic bytecode instrumentationSoftware: Practice and Experience10.1002/spe.238546:10(1351-1380)Online publication date: 18-Dec-2015
  • (2013)Dynamic optimization of bytecode instrumentationProceedings of the 7th ACM workshop on Virtual machines and intermediate languages10.1145/2542142.2542145(21-30)Online publication date: 28-Oct-2013
  • (2013)Towards performance monitoring overhead reduction2013 IEEE 11th International Symposium on Intelligent Systems and Informatics (SISY)10.1109/SISY.2013.6662557(135-140)Online publication date: Sep-2013
  • (2012)Dynamic aspect-oriented programming in javaTransactions on Aspect-Oriented Software Development IX10.5555/2434958.2434962(92-122)Online publication date: 1-Jan-2012
  • (2012)Programming strategies for runtime adaptability7th International Workshop on Reconfigurable and Communication-Centric Systems-on-Chip (ReCoSoC)10.1109/ReCoSoC.2012.6322875(1-8)Online publication date: Jul-2012
  • (2012)Dynamic Aspect-Oriented Programming in Java: The HotWave ExperienceTransactions on Aspect-Oriented Software Development IX10.1007/978-3-642-35551-6_3(92-122)Online publication date: 2012
  • (2011)Safe and atomic run-time code evolution for Java and its application to dynamic AOPACM SIGPLAN Notices10.1145/2076021.204812946:10(825-844)Online publication date: 22-Oct-2011
  • (2011)Safe and atomic run-time code evolution for Java and its application to dynamic AOPProceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications10.1145/2048066.2048129(825-844)Online publication date: 22-Oct-2011
  • (2011)Distributed dynamic weaving is a crosscutting concernProceedings of the 2011 ACM Symposium on Applied Computing10.1145/1982185.1982479(1353-1360)Online publication date: 21-Mar-2011
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media