Revert "Consolidate read table cleaning"

This reverts commit 9552021cbeec699e7b04db81fa68819c23b7dab7.
This commit is contained in:
William Kemper 2025-06-12 15:06:40 -07:00
parent 9552021cbe
commit a313cf8de7
3 changed files with 14 additions and 9 deletions

View File

@ -640,6 +640,10 @@ void ShenandoahConcurrentGC::op_reset() {
} else {
_generation->prepare_gc();
}
if (heap->mode()->is_generational()) {
heap->old_generation()->card_scan()->mark_read_table_as_clean();
}
}
class ShenandoahInitMarkUpdateRegionStateClosure : public ShenandoahHeapRegionClosure {

View File

@ -136,11 +136,15 @@ void ShenandoahDegenGC::op_degenerated() {
heap->set_unload_classes(_generation->heuristics()->can_unload_classes() &&
(!heap->mode()->is_generational() || _generation->is_global()));
op_reset();
if (heap->mode()->is_generational()) {
// 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 (heap->mode()->is_generational() && _generation->is_young()) {
// Swap remembered sets for young
_generation->swap_card_tables();
if (_generation->is_young()) {
// Swap remembered sets for young
_generation->swap_card_tables();
}
}
case _degenerated_roots:
@ -178,6 +182,8 @@ void ShenandoahDegenGC::op_degenerated() {
}
}
op_reset();
// STW mark
op_mark();

View File

@ -246,11 +246,6 @@ void ShenandoahGeneration::merge_write_table() {
void ShenandoahGeneration::prepare_gc() {
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) {