Consolidate read table cleaning
This commit is contained in:
parent
5e2c20a80f
commit
9552021cbe
@ -640,10 +640,6 @@ void ShenandoahConcurrentGC::op_reset() {
|
|||||||
} else {
|
} else {
|
||||||
_generation->prepare_gc();
|
_generation->prepare_gc();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap->mode()->is_generational()) {
|
|
||||||
heap->old_generation()->card_scan()->mark_read_table_as_clean();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ShenandoahInitMarkUpdateRegionStateClosure : public ShenandoahHeapRegionClosure {
|
class ShenandoahInitMarkUpdateRegionStateClosure : public ShenandoahHeapRegionClosure {
|
||||||
|
@ -136,15 +136,11 @@ void ShenandoahDegenGC::op_degenerated() {
|
|||||||
heap->set_unload_classes(_generation->heuristics()->can_unload_classes() &&
|
heap->set_unload_classes(_generation->heuristics()->can_unload_classes() &&
|
||||||
(!heap->mode()->is_generational() || _generation->is_global()));
|
(!heap->mode()->is_generational() || _generation->is_global()));
|
||||||
|
|
||||||
if (heap->mode()->is_generational()) {
|
op_reset();
|
||||||
// Clean the read table before swapping it. The end goal here is to have a clean
|
|
||||||
// write table, and to have the read table updated with the previous write table.
|
|
||||||
heap->old_generation()->card_scan()->mark_read_table_as_clean();
|
|
||||||
|
|
||||||
if (_generation->is_young()) {
|
if (heap->mode()->is_generational() && _generation->is_young()) {
|
||||||
// Swap remembered sets for young
|
// Swap remembered sets for young
|
||||||
_generation->swap_card_tables();
|
_generation->swap_card_tables();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case _degenerated_roots:
|
case _degenerated_roots:
|
||||||
@ -182,8 +178,6 @@ void ShenandoahDegenGC::op_degenerated() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
op_reset();
|
|
||||||
|
|
||||||
// STW mark
|
// STW mark
|
||||||
op_mark();
|
op_mark();
|
||||||
|
|
||||||
|
@ -246,6 +246,11 @@ void ShenandoahGeneration::merge_write_table() {
|
|||||||
|
|
||||||
void ShenandoahGeneration::prepare_gc() {
|
void ShenandoahGeneration::prepare_gc() {
|
||||||
reset_mark_bitmap<true>();
|
reset_mark_bitmap<true>();
|
||||||
|
|
||||||
|
ShenandoahHeap* const heap = ShenandoahHeap::heap();
|
||||||
|
if (heap->mode()->is_generational()) {
|
||||||
|
heap->old_generation()->card_scan()->mark_read_table_as_clean();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShenandoahGeneration::parallel_heap_region_iterate_free(ShenandoahHeapRegionClosure* cl) {
|
void ShenandoahGeneration::parallel_heap_region_iterate_free(ShenandoahHeapRegionClosure* cl) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user