RFR: 8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap_roots
Thomas Schatzl
tschatzl at openjdk.org
Mon Oct 17 12:15:26 UTC 2022
On Mon, 17 Oct 2022 10:10:33 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple change of asserting the to-be-scanned card is strictly dirty.
>
> Test: tier1-6
Lgtm.
src/hotspot/share/gc/g1/g1RemSet.cpp line 840:
> 838: assert(value == CardTable::dirty_card_val(), "is %d at region %u idx " SIZE_FORMAT, value, region_idx, first_scan_idx);
> 839: }
> 840: #endif
Suggestion:
DEBUG_ONLY(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);
Just fyi, an alternative that does not create that many lines with almost no content.
-------------
Marked as reviewed by tschatzl (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10725
More information about the hotspot-gc-dev
mailing list