Dynamic object sampling for pretenuring

Maria Jump*, Stephen M. Blackburn, Kathryn S. McKinley

*Corresponding author for this work

    Research output: Contribution to conferencePaperpeer-review

    44 Citations (Scopus)


    Many state-of-the-art garbage collectors are generational, collecting the young nursery objects more frequently than old objects. These collectors perform well because young objects tend to die at a higher rate than old ones. However, these collectors do not examine object lifetimes with respect to any particular program or allocation site. This paper introduces low-cost object sampling to dynamically determine lifetimes. The sampler marks an object and records its allocation site every n bytes of allocation. The collector then computes per-site nursery survival rates. Sampling degrades total performance by only 3% on average for sample rates of 256 bytes in Jikes RVM, a rate at which overall lifetime accuracy compares well with sampling every object. An adaptive collector can use this information to tune itself. For example, pretenuring decreases nursery collection work by allocating new, but long-lived, objects directly into the mature space. We introduce a dynamic pretenuring mechanism that detects long-lived allocation sites and pretenures them, given sufficient samples. To react to phase changes, it occasionally backsamples. As with previous online pretenuring, consistent performance improvements on SPECjvm98 benchmarks are difficult to attain since only two combine sufficient allocation load with high nursery survival. Our pretenuring system consistently improves one of these, 213 javac, by 2% to 9% of total time by decreasing collection time by over a factor of two. Sampling and pretenuring overheads slow down all the others. This paper thus provides an efficient sampling mechanism that accurately predicts lifetimes, but leaves open optimization policies that can exploit this information.

    Original languageEnglish
    Number of pages11
    Publication statusPublished - 2004
    Event2004 International Symposium on Memory Management, ISMM 2004 - Vancouver, BC, Canada
    Duration: 24 Oct 200425 Oct 2004


    Conference2004 International Symposium on Memory Management, ISMM 2004
    CityVancouver, BC


    Dive into the research topics of 'Dynamic object sampling for pretenuring'. Together they form a unique fingerprint.

    Cite this