A fast analysis for thread-local garbage collection with dynamic class loading

Long-running, heavily multi-threaded, Java server applications make stringent demands of garbage collector (GC) performance. Synchronisation of all application threads before garbage collection is a significant bottleneck for JVMs that use native threads. We present a new static analysis and a novel GC framework designed to address this issue by allowing independent collection of thread-local heaps. In contrast to previous work, our solution safely classifies objects even in the presence of dynamic class loading, requires neither write-barriers that may do unbounded work, nor synchronisation, nor locks during thread-local collections; our analysis is sufficiently fast to permit its integration into a high-performance, production-quality virtual machine.

[1]  CierniakMichał,et al.  Support for garbage collection at every instruction in a Java compiler , 1999 .

[2]  Lars Ole Andersen,et al.  Program Analysis and Specialization for the C Programming Language , 2005 .

[3]  Hans-Juergen Boehm,et al.  Garbage collection in an uncooperative environment , 1988, Softw. Pract. Exp..

[4]  Damien Doligez,et al.  Portable, unobtrusive garbage collection for multiprocessor systems , 1994, POPL '94.

[5]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[6]  Escape Analysis for Java. Theory and Practice , 2003 .

[7]  David F. Bacon,et al.  Fast static analysis of C++ virtual function calls , 1996, OOPSLA '96.

[8]  Damien Doligez,et al.  A concurrent, generational garbage collector for a multithreaded implementation of ML , 1993, POPL '93.

[9]  Urs Hölzle,et al.  Removing unnecessary synchronization in Java , 1999, OOPSLA '99.

[10]  William Landi,et al.  Undecidability of static analysis , 1992, LOPL.

[11]  Bjarne Steensgaard,et al.  Thread-specific heaps for multi-threaded programs , 2000, ISMM '00.

[12]  Amer Diwan,et al.  Connectivity-based garbage collection , 2003, OOPSLA '03.

[13]  Mauricio J. Serrano,et al.  Characterizing the memory behavior of Java workloads: a structured view and opportunities for optimizations , 2001, SIGMETRICS '01.

[14]  Bowen Alpern,et al.  Implementing jalapeño in Java , 1999, OOPSLA '99.

[15]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

[16]  Olivier Tardieu,et al.  Demand-driven pointer analysis , 2001, PLDI '01.

[17]  Bruno Blanchet,et al.  Escape analysis for JavaTM: Theory and practice , 2003, TOPL.

[18]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[19]  Michael Hind,et al.  Which pointer analysis should I use? , 2000, ISSTA '00.

[20]  Andrew C. King Removing garbage collector synchronisation , 2004 .

[21]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[22]  Michael Wolf,et al.  The pauseless GC algorithm , 2005, VEE '05.

[23]  Ole Agesen GC Points in a Threaded Environment , 1998 .

[24]  Alexander Aiken,et al.  Polymorphic versus Monomorphic Flow-Insensitive Points-to Analysis for C , 2000, SAS.

[25]  Emin Gün Sirer,et al.  Comprehensive synchronization elimination for Java , 2003, Sci. Comput. Program..

[26]  V. T. Rajan,et al.  An efficient on-the-fly cycle collection , 2005, TOPL.

[27]  Erez Petrank,et al.  Thread-local heaps for Java , 2002, ISMM '02.

[28]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[29]  Manuvir Das,et al.  Unification-based pointer analysis with directional assignments , 2000, PLDI '00.

[30]  James M. Stichnoth,et al.  Support for garbage collection at every instruction in a Java compiler , 1999, PLDI '99.