A Selective, Just-in-Time Aspect Weaver

  • Yoshiki Sato
  • Shigeru Chiba
  • Michiaki Tatsubori
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2830)


Dynamic AOP (Aspect-Oriented Programming) is receiving growing interests in both the academia and the industry. Since it allows weaving aspects with a program at runtime, it is useful for rapid prototyping and adaptive software. However, the previous implementations of dynamic AOP systems suffered from serious performance penalties. This paper presents our new efficient dynamic AOP system in Java for addressing the underlying problem. This system called Wool is a hybrid of two approaches. When a new aspect is woven in, the programmers can select to reload into the JVM a modified class file in which hooks for executing advice are statically embedded, or they can insert hooks as breakpoints in the JVM. Since the two approaches have different performance characteristics, the programmers can select the best one for each join point. Our experimental result shows, under a certain circumstance, Wool runs dynamic AOP application about 26% faster than a traditional static code translation approach.


Method Call Java Virtual Machine Activation Frame Dynamic Adaptive Programming Draw Method 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Alpern, B., Attanasio, C.R., Barton, J.J., Burke, M.G., Cheng, P., Choi, J.D., Cocchi, A., Fink, S.J., Grove, D., Hind, M., Hummel, S.F., Lieber, D., Litvinov, V., Mergen, M.F., Ngo, T., Russell, J.R., Sarkar, V., Serrano, M.J., Shepherd, J.C., Smith, S.E., Sreedhar, V.C., Srinivasan, H., Whaley, J.: The Jalapeno virtual machine. IBM System Journal 39, 211–238 (2000)Google Scholar
  2. 2.
    Baker, J., Hsieh, W.: Runtime Aspect Weaving Through Metaprogramming. In: AOSD 2002, pp. 86–95 (2002)Google Scholar
  3. 3.
    Braux, M., Noyé, J.: Towards Partially Evaluating Reflection in Java. In: Proceedings of the 2000 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 2000) (2000)Google Scholar
  4. 4.
    Chiba, S.: Load-time structural reflection in Java. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, pp. 313–336. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  5. 5.
    Chiba, S., Nishizawa, M.: An Easy-to-use but Efficient Java Bytecode Translator. In: Pfenning, F., Smaragdakis, Y. (eds.) GPCE 2003. LNCS, vol. 2830, pp. 364–376. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  6. 6.
    Chiba, S., Sato, Y., Tatsubori, M.: Using HotSwap for Implementing Dynamic AOP Systems. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, Springer, Heidelberg (2003)Google Scholar
  7. 7.
    Davies, J., Huismans, N., Slaney, R., Whiting, S., Webster, M., Berry, R.: Aspect oriented profiler. In: 2nd International Conference on Aspect-Oriented Software Development (2003)Google Scholar
  8. 8.
    Dmitriev, M.: Towards flexible and safe technology for runtime evolution of java language applications. In: Proceedings of the Workshop on Engineering Complex Object-Oriented Systems for Evolution, in association with OOPSLA 2001 International Conference, Tampa Bay, Florida, USA, pp. 14–18 (2001)Google Scholar
  9. 9.
    Easy Software Foundation: ajProfiler - easy java profiler (2002),
  10. 10.
    Evans, H., Dickman, P.: Zones, contracts and absorbing changes: An approach to software evolution. In: Proceedings of OOPSLA 1999, Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications, Denver, Colorado, USA. SIGPLAN Notices vol.34, vol. 10, pp. 415–434. ACM, New York (1999)CrossRefGoogle Scholar
  11. 11.
    Joergensen, B.N., Truyen, E., Matthijs, F., Joosen, W.: Customization of Object Request Brokers by Application Specific Policies. In: Coulson, G., Sventek, J. (eds.) Middleware 2000. LNCS, vol. 1795, p. 144. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  12. 12.
    Keller, R., Hölzle, U.: Binary component adaptation. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 307–329. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  13. 13.
    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–353. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  14. 14.
    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)CrossRefGoogle Scholar
  15. 15.
    Masuhara, H., Kiczales, G., Dutchyn, C.: A compilation and optimization model for aspect-oriented programs. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 46–60. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  16. 16.
    Ogawa, H., Shimura, K., Matsuoka, S., Maruyama, F., Sohda, Y., Kimura, Y.: OpenJIT frontend system: an implementation of the reflective JIT compiler frontend. In: Bertino, E. (ed.) ECOOP 2000. LNCS, vol. 1850, p. 362. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  17. 17.
    Orleans, D., Lieberherr, K.: DJ: Dynamic adaptive programming in Java. In: Yonezawa, A., Matsuoka, S. (eds.) Reflection 2001. LNCS, vol. 2192, pp. 73–80. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  18. 18.
    Pawlak, R., Seinturier, L., Duchien, L., Florin, G.: JAC: A flexible framework for AOP in Java. In: Reflection 2001, pp. 1–24 (2001)Google Scholar
  19. 19.
    Popovici, A., Alonso, G., Gross, T.: Just in Time Aspects: Efficient Dynamic Weaving for Java. In: 2nd International Conference on Aspect-Oriented Software Development (2003)Google Scholar
  20. 20.
    Popovici, A., Gross, T., Alonso, G.: Dynamic Weaving for Aspect-Orinented Programming. In: AOSD 2002, pp. 141–147 (2002)Google Scholar
  21. 21.
    Segura-Devillechaise, M., Jean-Marc Menaud, G.M., Lawall, J.L.: Web Cache Prefetching as an Aspect: Towards a Dynamic-Weaving Based Solution. In: 2nd International Conference on Aspect-Oriented Software Development (2003)Google Scholar
  22. 22.
    Spec - The Standard Performance Evaluation Corporation: SPECjvm98 (1998),
  23. 23.
    Suganuma, T., Ogasawara, T., Takeuchi, M., Yasue, T., Kawahito, M., Ishizaki, K., Komatsu, H., Nakatani, T.: Overview of the IBM Java just-in-time compiler. IBM Systems Journals 39, 175–193 (2000)CrossRefGoogle Scholar
  24. 24.
    Sun Microsystems: JavaTM platform debugger architecture (2001),
  25. 25.
    Truyen, E., Jrgensen, B.N., Joosen, W.: Customization of component-based object request brokers through dynamic configuration. In: Technology of Object-Oriented Languages and Systems (2000)Google Scholar
  26. 26.
    Yagoub, K., Florescu, D., Issarny, V., Valduriez, P.: Caching Strategies for Data- Intensive Web Sites. In: Proceedings of the 24th International Conference on Very Large Databases (VLDB), Cairo Egypt (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Yoshiki Sato
    • 1
  • Shigeru Chiba
    • 1
  • Michiaki Tatsubori
    • 2
  1. 1.Dept. of Mathematical and Computing SciencesTokyo Institute of Technology 
  2. 2.IBM Tokyo Research Laboratory 

Personalised recommendations