RFR: 8296374: Check for young region in G1BarrierSet::invalidate instead of card-by-card check [v2]
Thomas Schatzl
tschatzl at openjdk.org
Thu Dec 15 14:50:08 UTC 2022
On Thu, 15 Dec 2022 10:39:44 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Hi,
>>
>> Please review this change to young region card checks in G1BarrierSet::invalidate(). A single check should suffice because the MemRegion for invalidation in G1 is either completely in the young gen or not.
>>
>> Testing: Tier 1-3
>
> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
>
> Albert review
Marked as reviewed by tschatzl (Reviewer).
src/hotspot/share/gc/g1/g1BarrierSet.cpp line 113:
> 111: // skip young gen cards
> 112: if (*byte == G1CardTable::g1_young_card_val()) {
> 113: assert(mr.word_size() <= HeapRegion::GrainWords, "Invalidated MemRegion is larger than HeapRegion in young gen");
I would change this to a check that the memregion (in young) does not span multiple regions; for the same reason one could check that it is not humongous(is that true?), but I'm not sure what the background for this check is, so.
Feel free to improve the check.
Other than that comment, looks good.
-------------
PR: https://git.openjdk.org/jdk/pull/11677
More information about the hotspot-gc-dev
mailing list