Skip to content

Commit

Permalink
8312120: GenShen: Update OLD Live at end of Previous Marking after Fu…
Browse files Browse the repository at this point in the history
…ll GC

Reviewed-by: kdnilsen
  • Loading branch information
William Kemper committed Aug 17, 2023
1 parent 2c06240 commit 529a379
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,16 @@ void ShenandoahFullGC::phase1_mark_heap() {
ShenandoahSTWMark mark(heap->global_generation(), true /*full_gc*/);
mark.mark();
heap->parallel_cleaning(true /* full_gc */);

size_t live_bytes_in_old = 0;
for (size_t i = 0; i < heap->num_regions(); i++) {
ShenandoahHeapRegion* r = heap->get_region(i);
if (r->is_old()) {
live_bytes_in_old += r->get_live_data_bytes();
}
}
log_info(gc)("Live bytes in old after STW mark: " PROPERFMT, PROPERFMTARGS(live_bytes_in_old));
heap->old_generation()->set_live_bytes_after_last_mark(live_bytes_in_old);
}

class ShenandoahPrepareForCompactionTask : public WorkerTask {
Expand Down

0 comments on commit 529a379

Please sign in to comment.