File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
src/hotspot/share/gc/shenandoah Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -415,10 +415,6 @@ void ShenandoahConcurrentGC::entry_reset() {
415
415
msg);
416
416
op_reset ();
417
417
}
418
-
419
- if (heap->mode ()->is_generational ()) {
420
- heap->old_generation ()->card_scan ()->mark_read_table_as_clean ();
421
- }
422
418
}
423
419
424
420
void ShenandoahConcurrentGC::entry_scan_remembered_set () {
@@ -644,6 +640,10 @@ void ShenandoahConcurrentGC::op_reset() {
644
640
} else {
645
641
_generation->prepare_gc ();
646
642
}
643
+
644
+ if (heap->mode ()->is_generational ()) {
645
+ heap->old_generation ()->card_scan ()->mark_read_table_as_clean ();
646
+ }
647
647
}
648
648
649
649
class ShenandoahInitMarkUpdateRegionStateClosure : public ShenandoahHeapRegionClosure {
Original file line number Diff line number Diff line change @@ -136,9 +136,15 @@ void ShenandoahDegenGC::op_degenerated() {
136
136
heap->set_unload_classes (_generation->heuristics ()->can_unload_classes () &&
137
137
(!heap->mode ()->is_generational () || _generation->is_global ()));
138
138
139
- if (heap->mode ()->is_generational () && _generation->is_young ()) {
140
- // Swap remembered sets for young
141
- _generation->swap_card_tables ();
139
+ if (heap->mode ()->is_generational ()) {
140
+ // Clean the read table before swapping it. The end goal here is to have a clean
141
+ // write table, and to have the read table updated with the previous write table.
142
+ heap->old_generation ()->card_scan ()->mark_read_table_as_clean ();
143
+
144
+ if (_generation->is_young ()) {
145
+ // Swap remembered sets for young
146
+ _generation->swap_card_tables ();
147
+ }
142
148
}
143
149
144
150
case _degenerated_roots:
You can’t perform that action at this time.
0 commit comments