From bb4aed944ea511df8ddfbd50c885a271a2ea9464 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Fri, 31 May 2024 07:58:32 +0000 Subject: [PATCH] 8332961: Parallel: Limit PSParallelCompact::verify_complete range Reviewed-by: tschatzl, gli --- src/hotspot/share/gc/parallel/psParallelCompact.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.cpp b/src/hotspot/share/gc/parallel/psParallelCompact.cpp index 48430dbe36774..367e76c805770 100644 --- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp +++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp @@ -2130,14 +2130,14 @@ void PSParallelCompact::verify_filler_in_dense_prefix() { } void PSParallelCompact::verify_complete(SpaceId space_id) { - // All Regions between space bottom() to new_top() should be marked as filled - // and all Regions between new_top() and top() should be available (i.e., - // should have been emptied). + // All Regions served as compaction targets, from dense_prefix() to + // new_top(), should be marked as filled and all Regions between new_top() + // and top() should be available (i.e., should have been emptied). ParallelCompactData& sd = summary_data(); SpaceInfo si = _space_info[space_id]; HeapWord* new_top_addr = sd.region_align_up(si.new_top()); HeapWord* old_top_addr = sd.region_align_up(si.space()->top()); - const size_t beg_region = sd.addr_to_region_idx(si.space()->bottom()); + const size_t beg_region = sd.addr_to_region_idx(si.dense_prefix()); const size_t new_top_region = sd.addr_to_region_idx(new_top_addr); const size_t old_top_region = sd.addr_to_region_idx(old_top_addr);