Abstract
The non-local nature of advice applicability in AspectJ means that in many implementations small changes to aspects can require much of the program code to be scanned and possibly rewritten. This can slow down application startup, including the edit-compile-debug development cycle.
Late binding of advice has been suggested to improve the situation, at the potential cost of runtime performance. We propose and evaluate two virtual machine (VM) internal late binding approaches, that operate at whole-class and whole-method granularity.
Our evaluation shows that in VMs that allow bytecode mutation the preferred approach is to scan and rewrite methods the first time they are executed. In other VMs, whole-class scanning and rewriting at load time performs better. A separate interpreter based approach has startup performance similar to that of the whole-class approach; but micro-benchmarks suggest the latter out-performs the former over time.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Mezini, M., Ostermann, K.: Conquering aspects with Caesar. In: AOSD ’03: Proceedings of the 2nd international conference on Aspect-oriented software development, pp. 90–99. ACM Press, New York (2003)
Rajan, H., Sullivan, K.: Eos: instance-level aspects for integrated system design. In: ESEC/FSE-11: Proceedings of the 9th European software engineering conference held jointly with 11th ACM SIGSOFT international symposium on Foundations of Software Engineering, pp. 297–306. ACM Press, New York (2003)
Suvée, D., Vanderperren, W., Jonckers, V.: JAsCo: An Aspect-oriented Approach Tailored for Component Based Software Development. In: AOSD ’03: Proceedings of the 2nd international conference on Aspect-oriented software development, pp. 21–29. ACM, New York (2003)
Masuhara, H., Endoh, Y., Yonezawa, A.: A Fine-Grained Join Point Model for More Reusable Aspects. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 131–147. Springer, Heidelberg (2006)
IBM J9 Team Members. Personal Communication (2009)
Alpern, B., Attanasio, C.R., Cocchi, A., Lieber, D., Smith, S., Ngo, T., Barton, J.J., Hummel, S.F., Sheperd, J.C., Mergen, M.: Implementing Jalapeño in Java. In: OOPSLA ’99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 314–324. ACM Press, New York (1999)
Hilsdale, E., Hugunin, J.: Advice weaving in AspectJ. In: AOSD ’04: Proceedings of the 3rd international conference on Aspect-oriented software development, pp. 26–35. ACM Press, New York (2004)
ABC Group: abc (AspectBench Compiler) http://aspectbench.org
Dyer, R., Setty, R.B., Rajan, H.: Nu: Toward a Flexible and Dynamic Aspect-Oriented Intermediate Language Model. Technical report, Iowa State University (June 2007)
Naseer, I., Golbeck, R.M., Selby, P., Kiczales, G.: Interpreter Implementation of Advice Weaving. Technical Report TR-2010-01, University of British Columbia (January 2010)
Golbeck, R.M., Davis, S., Naseer, I., Ostrovsky, I., Kiczales, G.: Lightweight Virtual Machine Support for AspectJ. In: AOSD ’08: Proceedings of the 7th international conference on Aspect-oriented software development, pp. 180–190. ACM, New York (2008)
Golbeck, R.M., Kiczales, G.: A Machine Code Model for Efficient Advice Dispatch. In: VMIL ’07: Proceedings of the 1st workshop on Virtual machines and intermediate languages for emerging modularization mechanisms, p. 2. ACM Press, New York (2007)
Haupt, M., Mezini, M., Bockisch, C., Dinkelaker, T., Eichberg, M., Krebs, M.: An Execution Layer for Aspect-Oriented Programming Languages. In: Vitek, J. (ed.) Proceedings of the First International Conference on Virtual Execution Environments (VEE’05), Chicago, USA, June 2005, pp. 142–152. ACM Press, New York (2005)
Blackburn, S.M., Garner, R., Hoffmann, C., Khang, A.M., McKinley, K.S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M., Hosking, A., Jump, M., Lee, H., Moss, J.E.B., Moss, B., Phansalkar, A., Stefanović, D., VanDrunen, T., von Dincklage, D., Wiedermann, B.: The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In: OOPSLA ’06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pp. 169–190. ACM Press, New York (2006)
Standard Performance Evaluation Corporation: SPECjvm2008, http://www.spec.org/jvm2008/
AspectJ Team: AspectJ Project, http://www.eclipse.org/aspectj/
OW2 Consortium: ASM, http://asm.ow2.org/
Apache Software Foundation: Apache BCEL, http://jakarta.apache.org/bcel/
Georges, A., Buytaert, D., Eeckhout, L.: Statistically Rigorous Java Performance Evaluation. In: OOPSLA ’07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems, languages and applications (2007)
Bockisch, C., Kanthak, S., Haupt, M., Arnold, M., Mezini, M.: Efficient Control Flow Quantification. SIGPLAN Not. 41(10), 125–138 (2006)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–355. Springer, Heidelberg (2001)
Bonér, J., Vasseur, A.: AspectWerkz, http://aspectwerkz.codehaus.org/index.html
Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhohák, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: abc: an extensible AspectJ compiler. In: AOSD ’05: Proceedings of the 4th international conference on Aspect-oriented software development, pp. 87–98. ACM Press, New York (2005)
Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: Optimising AspectJ. In: PLDI ’05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, pp. 117–128. ACM Press, New York (2005)
Vanderperren, W., Suvée, D., Verheecke, B., Cibrán, M.A., Jonckers, V.: Adaptive Programming in JAsCo. In: AOSD ’05: Proceedings of the 4th international conference on Aspect-oriented software development, pp. 75–86. ACM, New York (2005)
Popovici, A., Alonso, G., Gross, T.: Just-in-time Aspects: Efficient Dynamic Weaving for Java. In: AOSD ’03: Proceedings of the 2nd international conference on Aspect-oriented software development, pp. 100–109. ACM Press, New York (2003)
Bockisch, C., Haupt, M., Mezini, M., Ostermann, K.: Virtual Machine Support for Dynamic Join Points. In: AOSD ’04: Proceedings of the 3rd International Conference on Aspect-oriented Software Development, pp. 83–92. ACM Press, New York (2004)
Dyer, R., Rajan, H.: Nu: A dynamic aspect-oriented intermediate language model and virtual machine for flexible runtime adaptation. In: AOSD ’08: Proceedings of the 7th international conference on Aspect-oriented software development, pp. 191–202. ACM, New York (2008)
Bockisch, C., Mezini, M.: A Flexible Architecture for pointcut-advice Language Implementations. In: VMIL ’07: Proceedings of the 1st workshop on Virtual Machines and Intermediate Languages for Emerging Modularization Mechanisms, p. 1. ACM, New York (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Golbeck, R.M., Selby, P., Kiczales, G. (2010). Late Binding of AspectJ Advice. In: Vitek, J. (eds) Objects, Models, Components, Patterns. TOOLS 2010. Lecture Notes in Computer Science, vol 6141. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13953-6_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-13953-6_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-13952-9
Online ISBN: 978-3-642-13953-6
eBook Packages: Computer ScienceComputer Science (R0)