RFR: 8271880: Tighten condition for excluding regions from collecting cards with cross-references [v11]
Thomas Schatzl
tschatzl at openjdk.java.net
Thu Sep 23 11:10:54 UTC 2021
On Mon, 20 Sep 2021 12:12:36 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase.
>
> src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp line 116:
>
>> 114: if (!dest_attr.is_in_cset()) {
>> 115: enqueue_card_if_tracked(dest_attr, p, obj);
>> 116: }
>
> If I understand this correctly, the only time `dest_attr.is_in_cset() == true` is when `obj` is in a region that failed evacuation, right? To make this even more obvious could we add an else-statement with an assert that this is the case?
This is unfortunately not possible due to races (I tried :)) - one thread may set the flag, another one in the meanwhile already fail again an object in the region, and the evacuation-failed flag not yet visible to this thread.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5037
More information about the hotspot-gc-dev
mailing list