Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap…
…_roots

Reviewed-by: tschatzl, iwalulya
  • Loading branch information
albertnetymk committed Oct 26, 2022
1 parent 303548b commit 33ff80d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/hotspot/share/gc/g1/g1RemSet.cpp
Expand Up @@ -705,7 +705,12 @@ class G1ScanHRForRegionClosure : public HeapRegionClosure {

size_t first_scan_idx = scan.find_next_dirty();
while (first_scan_idx != claim.size()) {
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);
#ifdef ASSERT
{
CardTable::CardValue value = *_ct->byte_for_index(region_card_base_idx + first_scan_idx);
assert(value == CardTable::dirty_card_val(), "is %d at region %u idx " SIZE_FORMAT, value, region_idx, first_scan_idx);
}
#endif

size_t const last_scan_idx = scan.find_next_non_dirty();
size_t const len = last_scan_idx - first_scan_idx;
Expand Down

1 comment on commit 33ff80d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.