6711316: Open source the Garbage-First garbage collector

First mercurial integration of the code for the Garbage-First garbage collector.

Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
This commit is contained in:
Y. Srinivas Ramakrishna 2008-06-05 15:57:56 -07:00
parent 39463bb3fc
commit 18f3386a98
215 changed files with 36088 additions and 1249 deletions

View file

@ -238,11 +238,14 @@ void HeapInspection::heap_inspection(outputStream* st) {
HeapWord* ref;
CollectedHeap* heap = Universe::heap();
bool is_shared_heap = false;
switch (heap->kind()) {
case CollectedHeap::G1CollectedHeap:
case CollectedHeap::GenCollectedHeap: {
GenCollectedHeap* gch = (GenCollectedHeap*)heap;
gch->gc_prologue(false /* !full */); // get any necessary locks
ref = gch->perm_gen()->used_region().start();
is_shared_heap = true;
SharedHeap* sh = (SharedHeap*)heap;
sh->gc_prologue(false /* !full */); // get any necessary locks, etc.
ref = sh->perm_gen()->used_region().start();
break;
}
#ifndef SERIALGC
@ -284,9 +287,9 @@ void HeapInspection::heap_inspection(outputStream* st) {
}
st->flush();
if (Universe::heap()->kind() == CollectedHeap::GenCollectedHeap) {
GenCollectedHeap* gch = GenCollectedHeap::heap();
gch->gc_epilogue(false /* !full */); // release all acquired locks
if (is_shared_heap) {
SharedHeap* sh = (SharedHeap*)heap;
sh->gc_epilogue(false /* !full */); // release all acquired locks, etc.
}
}