RFR: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions [v2]

Albert Mingkun Yang ayang at openjdk.java.net
Fri Feb 19 11:26:18 UTC 2021


On Fri, 19 Feb 2021 10:59:45 GMT, Joakim Nordström <github.com+779991+jaokim at openjdk.org> wrote:

>> This fix adds a check for coarsened region in mutex guarded section, when adding a reference to a remembered set.
>> 
>> Haven't been able to produce a testcase -- please advice on how to, or if not necessary.
>> 
>> **Testing:**
>> * hs-tier, hs-tier2
>
> Joakim Nordström has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Clarified comment on re-checking coarsening
>  - Minor typo

Marked as reviewed by ayang (Author).

src/hotspot/share/gc/g1/heapRegionRemSet.cpp line 149:

> 147:     MutexLocker x(_m, Mutex::_no_safepoint_check_flag);
> 148: 
> 149:     // Make sure region hasn't been coarsened by other thread.

Maybe mentioning this is an intentional re-check under lock, sth like, "Rechecking if the region is coarsened while holding the lock."

-------------

PR: https://git.openjdk.java.net/jdk/pull/2545



More information about the hotspot-gc-dev mailing list