8343507: Parallel: Fail if verify_complete finds incorrect states

Reviewed-by: tschatzl, kbarrett
This commit is contained in:
Albert Mingkun Yang 2024-11-04 10:31:24 +00:00
parent 75801992a7
commit 452a5fbd9c

View File

@ -1912,18 +1912,14 @@ void PSParallelCompact::verify_complete(SpaceId space_id) {
size_t cur_region;
for (cur_region = beg_region; cur_region < new_top_region; ++cur_region) {
const RegionData* const c = sd.region(cur_region);
if (!c->completed()) {
log_warning(gc)("region " SIZE_FORMAT " not filled: destination_count=%u",
cur_region, c->destination_count());
}
assert(c->completed(), "region %zu not filled: destination_count=%u",
cur_region, c->destination_count());
}
for (cur_region = new_top_region; cur_region < old_top_region; ++cur_region) {
const RegionData* const c = sd.region(cur_region);
if (!c->available()) {
log_warning(gc)("region " SIZE_FORMAT " not empty: destination_count=%u",
cur_region, c->destination_count());
}
assert(c->available(), "region %zu not empty: destination_count=%u",
cur_region, c->destination_count());
}
}
#endif // #ifdef ASSERT