Distinguishing between prolific and non-prolific types for efficient memory management

In this paper we introduce the notion of prolific and non-prolific types, based on the number of instantiated objects of those types. We propose and empirically validate a new hypothesis, the prolific generational hypothesis, which states that the objects of prolific types have short lifetimes. We use this hypothesis to develop a new garbage collection scheme, which is similar in spirit to generational collection, but uses types rather than age to distinguish between different regions of the heap. It looks for garbage first among objects of prolific types. Our approach lets the compiler eliminate redundant write barriers by simply checking the type of objects involved in a pointer assignment. We describe techniques that enable this test to be done effectively at compile time, in spite of the complications due to polymorphism and dynamic class loading in Java. A preliminary implementation of this approach as a non-copying type-based collector in the Jalapeño Java Virtual Machine has shown very encouraging results. Compared with the corresponding generational collector, for the SPECjvm98 and SPECjbb2000 benchmarks, the number of dynamically executed write barriers is reduced by 18% to 74% (except for three programs, for which there is no reduction). The total garbage collection times are reduced by an average of 7.4% over all benchmark programs, with improvements of up to 15.2%. The overall performance improves modestly (by up to 2.8%) for all programs except for one (mtrt), for which there is a performance degradation of 2.2%.

[1]  Henry G. Baker,et al.  Infant mortality and generational garbage collection , 1993, SIGP.

[2]  Jong-Deok Choi,et al.  A framework for interprocedural optimization in the presence of dynamic class loading , 2000, PLDI '00.

[3]  Alex Garthwaite,et al.  Efficient object sampling via weak references , 2000, ISMM '00.

[4]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

[5]  Jin-Soo Kim,et al.  Memory system behavior of Java programs: methodology and analysis , 2000, SIGMETRICS '00.

[6]  Matthew L. Seidl,et al.  Segregating heap objects by reference behavior and lifetime , 1998, ASPLOS VIII.

[7]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.

[8]  Scott Nettles,et al.  A study of large object spaces , 1998, ISMM '98.

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

[10]  Kathryn S. McKinley,et al.  Profile-Driven Pretenuring for Java , 2000 .

[11]  Frank Jackson,et al.  Tenuring policies for generation-based storage reclamation , 1988, OOPSLA 1988.

[12]  Paul R. Wilson,et al.  Dynamic Storage Allocation: A Survey and Critical Review , 1995, IWMM.

[13]  Darko Stefanovic,et al.  A comparative performance evaluation of write barrier implementation , 1992, OOPSLA.

[14]  Timothy L. Harris,et al.  Dynamic adaptive pre-tenuring , 2000, ISMM '00.

[15]  Daniel G. Bobrow,et al.  An efficient, incremental, automatic garbage collector , 1976, CACM.

[16]  Amer Diwan,et al.  The Full Cost of a Generational Copying Garbage Collection Implementation , 1993 .

[17]  Benjamin G. Zorn,et al.  Comparative performance evaluation of garbage collection algorithms , 1989 .

[18]  Benjamin G. Zorn,et al.  Using lifetime predictors to improve memory allocation performance , 1993, PLDI '93.

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

[20]  Allen Wirfs-Brock,et al.  A Third Generation Smalltalk-80 Implementation , 1986, OOPSLA.

[21]  Kathryn S. McKinley,et al.  On Models for Object Lifetimes , 2000, International Symposium on Mathematical Morphology and Its Application to Signal and Image Processing.

[22]  Henry Lieberman,et al.  A real-time garbage collector based on the lifetimes of objects , 1983, CACM.

[23]  Urs Hölzle,et al.  A Fast Write Barrier for Generational Garbage Collectors , 1993 .

[24]  Amer Diwan,et al.  A Language-Independent Garbage Collector Toolkit , 1991 .

[25]  David Detlefs,et al.  Inlining of Virtual Methods , 1999, ECOOP.

[26]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

[27]  Darko Stefanovic,et al.  Properties of age-based automatic memory reclamation algorithms , 1999 .

[28]  Stephen J. Fink,et al.  The Jalapeño virtual machine , 2000, IBM Syst. J..

[29]  Samuel P. Midkiff,et al.  Quicksilver: a quasi-static compiler for Java , 2000, OOPSLA '00.

[30]  Kathryn S. McKinley,et al.  Age-based garbage collection , 1999, OOPSLA '99.

[31]  Michael H. Kalantar,et al.  Java server benchmarks , 2000, IBM Syst. J..