Skip to content

Commit 33ff80d

Browse files
committedOct 26, 2022
8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap_roots
Reviewed-by: tschatzl, iwalulya
1 parent 303548b commit 33ff80d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/hotspot/share/gc/g1/g1RemSet.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,12 @@ class G1ScanHRForRegionClosure : public HeapRegionClosure {
705705

706706
size_t first_scan_idx = scan.find_next_dirty();
707707
while (first_scan_idx != claim.size()) {
708-
assert(*_ct->byte_for_index(region_card_base_idx + first_scan_idx) <= 0x1, "is %d at region %u idx " SIZE_FORMAT, *_ct->byte_for_index(region_card_base_idx + first_scan_idx), region_idx, first_scan_idx);
708+
#ifdef ASSERT
709+
{
710+
CardTable::CardValue value = *_ct->byte_for_index(region_card_base_idx + first_scan_idx);
711+
assert(value == CardTable::dirty_card_val(), "is %d at region %u idx " SIZE_FORMAT, value, region_idx, first_scan_idx);
712+
}
713+
#endif
709714

710715
size_t const last_scan_idx = scan.find_next_non_dirty();
711716
size_t const len = last_scan_idx - first_scan_idx;

0 commit comments

Comments
 (0)
Please sign in to comment.