Dynamic code evolution for Java

  • Authors:
  • Thomas Würthinger;Christian Wimmer;Lukas Stadler

  • Affiliations:
  • Johannes Kepler University Linz, Austria;University of California, Irvine;Johannes Kepler University Linz, Austria

  • Venue:
  • Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamic code evolution is a technique to update a program while it is running. In an object-oriented language such as Java, this can be seen as replacing a set of classes by new versions. We modified an existing high-performance virtual machine to allow arbitrary changes to the definition of loaded classes. Besides adding and deleting fields and methods, we also allow any kind of changes to the class and interface hierarchy. Our approach focuses on increasing developer productivity during debugging. Changes can be applied at any point a Java program can be suspended. The evaluation section shows that our modifications to the virtual machine have no negative performance impact on normal program execution. The fast in-place instance update algorithm ensures that the performance characteristics of a change are comparable with performing a full garbage collection run. Standard Java development environments are capable of using the code evolution features of our modified virtual machine, so no additional tools are required.