Skip to content

Commit

Permalink
8312422: GenShen: In-place region promotion state may carry over when…
Browse files Browse the repository at this point in the history
… evacuation fails

Reviewed-by: kdnilsen
  • Loading branch information
William Kemper committed Jul 20, 2023
1 parent e754b19 commit 514fd37
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,15 @@ void ShenandoahFullGC::do_it(GCCause::Cause gc_cause) {
// f. Sync pinned region status from the CP marks
heap->sync_pinned_region_status();

if (heap->mode()->is_generational()) {
for (size_t i = 0; i < heap->num_regions(); i++) {
ShenandoahHeapRegion* r = heap->get_region(i);
if (r->get_top_before_promote() != nullptr) {
r->restore_top_before_promote();
}
}
}

// The rest of prologue:
_preserved_marks->init(heap->workers()->active_workers());

Expand Down

0 comments on commit 514fd37

Please sign in to comment.