Late binding of AspectJ advice

  • Authors:
  • Ryan M. Golbeck;Peter Selby;Gregor Kiczales

  • Affiliations:
  • University of British Columbia;University of British Columbia;University of British Columbia

  • Venue:
  • TOOLS'10 Proceedings of the 48th international conference on Objects, models, components, patterns
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

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.