RFR: 8293416: ZGC: Set mark bit with unconditional atomic ops [v2]

hev duke at openjdk.org
Wed Sep 7 02:25:44 UTC 2022


On Tue, 6 Sep 2022 18:42:19 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> hev has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>> 
>>   8293416: ZGC: Set mark bit with unconditional atomic ops
>
> src/hotspot/share/gc/z/zBitMap.inline.hpp line 62:
> 
>> 60:   const bm_word_t marked_mask = bit_mask(bit);
>> 61:   inc_live = !(cur_val & marked_mask);
>> 62:   return inc_live;
> 
> I don't think this is correct -- previously, the return value and `inc_live` can take different values. For example, when the current thread successfully upgrades an obj from finalize-marked to strongly-marked, the return value is `true` while `inc_live == false`.

You're right. I misunderstood the paired mark. BitMap also seems to work with this approach as well. I'll do these in next version.

Thank you.

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

PR: https://git.openjdk.org/jdk/pull/10182


More information about the hotspot-dev mailing list