RFR: 8374678: ZGC: Convert zForwarding to use Atomic<T> [v2]

Axel Boldt-Christmas aboldtch at openjdk.org
Wed Jan 14 09:36:38 UTC 2026


On Wed, 14 Jan 2026 08:21:27 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Use compare_set
>>  - Merge remote-tracking branch 'upstream_jdk/master' into JDK-8374678
>>  - ZGC: Convert zForwarding to use Atomic<T>
>
> src/hotspot/share/gc/z/zForwarding.cpp line 52:
> 
>> 50: 
>> 51: bool ZForwarding::claim() {
>> 52:   return _claimed.compare_exchange(false, true) == false;
> 
> Can this be the new compare_set?

Yeah, implemented this before that was available. I'll change the compare_exchange to compare_set where applicable.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29220#discussion_r2689662752


More information about the hotspot-gc-dev mailing list