Safe and Atomic Run-time Code Evolution for Java']Java and its Application to Dynamic AOP

被引:1
作者
Wuerthinger, Thomas [1 ]
Ansaloni, Danilo [2 ]
Binder, Walter [2 ]
Wimmer, Christian [3 ]
Moessenboeck, Hanspeter [1 ]
机构
[1] Johannes Kepler Univ Linz, Linz, Austria
[2] Univ Lugano, Lugano, Switzerland
[3] Univ Calif Irvine, Irvine, CA USA
关键词
Algorithms; Languages; Performance; !text type='Java']Java[!/text; virtual machine; run-time evolution; code evolution; dynamic software updating; update regions; dynamic aspect-oriented programming; AOP; AspectJ; PROGRAM;
D O I
10.1145/2076021.2048129
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Dynamic updates to running programs improve development productivity and reduce downtime of long-running applications. This feature is however severely limited in current virtual machines for object-oriented languages. In particular, changes to classes often apply only to methods invoked after a class change, but not to active methods on the call stack of threads. Additionally, adding and removing methods as well as fields is often not supported. We present a novel programming model for safe and atomic code updates of Java programs that also updates methods that are currently executed. We introduce safe update regions and pause threads only there before an update. We automatically convert the stack frames to suit the new versions of the methods. Our implementation is based on a production-quality Java virtual machine. Additionally, we present SafeWeave, a dynamic aspect-oriented programming system that exposes the atomic code updates through a high-level programming model. AspectJ advice can be added to and removed from a running application. Changes are atomic and correctness is guaranteed even though weaving happens in parallel to program execution, and the system fully supports the dynamic class loading of Java. We show that the enhanced evolution features do not incur any performance penalty before and after version changes.
引用
收藏
页码:825 / 844
页数:20
相关论文
共 3 条
  • [1] Safe and Atomic Run-time Code Evolution for Java']Java and its Application to Dynamic AOP
    Wuerthinger, Thomas
    Ansaloni, Danilo
    Binder, Walter
    Wimmer, Christian
    Moessenboeck, Hanspeter
    OOPSLA 11: PROCEEDINGS OF THE 2011 ACM INTERNATIONAL CONFERENCE ON OBJECT ORIENTED PROGRAMMING SYSTEMS LANGUAGES AND APPLICATIONS, 2011, : 825 - 844
  • [2] Unrestricted and safe dynamic code evolution for Java']Java
    Wuerthinger, Thomas
    Wimmer, Christian
    Stadler, Lukas
    SCIENCE OF COMPUTER PROGRAMMING, 2013, 78 (05) : 481 - 498
  • [3] Applications of Enhanced Dynamic Code Evolution for Java']Java in GUI Development and Dynamic Aspect-Oriented Programming
    Wuerthinger, Thomas
    Binder, Walter
    Ansaloni, Danilo
    Moret, Philippe
    Moessenboeck, Hanspeter
    ACM SIGPLAN NOTICES, 2011, 46 (02) : 123 - 126