Decrypting the Java Gene Pool: Predicting Object Lifetimes With
Micro-Patterns
Sebastien Marion, Richard Jones and Chris Ryder
The 2007 International
Symposium on Memory Management (ISMM 2007) Montreal, Canada, 21-22
October, 2007
Abstract
Pretenuring long-lived and immortal objects into regions that
are infrequently or never collected can reduce garbage collection costs
significantly. However, extant approaches to pretenuring are either
application-specific, which require extremely computationally expensive off-line
profiling, or use only 'build-time' prediction based on behaviour common to all
programs, i.e. of allocation by the virtual machine itself rather than
application programs.
In contrast, we show how a simple program analysis, combined with an object
lifetime knowledge bank, can be exploited to match both runtime system and
application program structure with object lifetimes. The analysis is cheap (with
complexity linear in the size of the program), so need not be run ahead of time.
We obtain performance gains of up to 48% in garbage collection time against a
generational copying collector.