Software evolves to fix bugs and add features. Stopping and restarting programs to apply changes is inconvenient and often costly. Dynamic software updating (DSU) addresses this problem by updating programs while they execute, but existing DSU systems for managed languages do not support many updates that occur in practice and are inefficient. This paper presents the design and implementation of JVOLVE, a DSU-enhanced Java VM. Updated programs may add, delete, and replace fields and methods anywhere within the class hierarchy. JVOLVE implements these updates by adding to and coordinating VM classloading, just-in-time compilation, scheduling, return barriers, on-stack replacement, and garbage collection. JVOLVE is safe: its use of bytecode verification and VM thread synchronization ensures that an update will always produce type-correct executions. JVOLVE is flexible: it can support 20 of 22 updates to three open-source programs—Jetty web server, JavaEmailServer, and CrossFTP se...
Suriya Subramanian, Michael W. Hicks, Kathryn S. M