Prior work, including our own, shows that application performance in garbage collected languages is highly dependent upon the application behavior and on underlying resource availability. We show that given a wide range of diverse garbage collection (GC) algorithms, no single system performs best across programs and heap sizes.
We present a Java Virtual Machine extension for dynamic and automatic switching between diverse, widely used GCs for application-specific garbage collection selection. We describe annotation-guided, and automatic GC switching. We also describe a novel extension to extant on-stack replacement (OSR) mechanisms for aggressive GC specialization that is readily amenable to compiler optimization.