UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Interpreter implementation of advice weaving Naseer, Muhammad Immad

Abstract

Implementing advice weaving using code rewriting can cause performance problems during application startup and incremental development. We present an interpreter based (non-rewriting) approach using a simple table and cache structure for matching pointcuts against dynamic join points together with a simple mechanism for calling the matched advice. An implementation in the JikesRVM, an open source research virtual machine, shows the approach is straightforward to implement. Internal micro-benchmarks show dynamic join point execution overhead of approximately 28% in the common case where no advice is applicable. Comparative micro-benchmarks with ajc load time weaving show startup time reductions equivalent to the interpreted execution of 100-117 million unadvised dynamic join points. The cache and table structures could be used during later (i.e. JIT time) per-method rewrite based weaving to reduce pointcut matching overhead. We conclude that it is worthwhile to develop and evaluate a complete in-VM hybrid implementation, comprising both non-rewriting and rewriting based advice weaving.

Item Citations and Data

Rights

Attribution-NonCommercial-NoDerivatives 4.0 International