mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
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:
parent
39463bb3fc
commit
18f3386a98
215 changed files with 36088 additions and 1249 deletions
|
@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue