RFR: 8376353: Parallel: Convert PSParallelCompact classes to use Atomic<T>

Albert Mingkun Yang ayang at openjdk.org
Mon Feb 9 21:26:16 UTC 2026


On Mon, 26 Jan 2026 16:58:25 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this change to convert `PSParallelCompact` to use `Atomic<T>`.
> 
> Testing: tier1-5,gha
> 
> Thanks,
>   Thomas

src/hotspot/share/gc/parallel/psParallelCompact.cpp line 1401:

> 1399:     for (unsigned int i = PSParallelCompact::old_space_id; i < PSParallelCompact::last_space_id; ++i) {
> 1400:       ::new (&_claim_counters[i]) Atomic<uint>{};
> 1401:     }

I wonder with `8376810: Make Atomic<T> default constructor non-explicit` merged, if this loop is still needed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29425#discussion_r2781631278


More information about the hotspot-gc-dev mailing list