RFR: 8376335: Convert PreservedMarks classes to use Atomic<T>
Stefan Karlsson
stefank at openjdk.org
Tue Jan 27 12:59:52 UTC 2026
On Mon, 26 Jan 2026 15:15:23 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this change to make the `PreservedMarks` classes use `Atomic<T>`.
>
> Some refactoring allowed removal of a now unnecessary function, and imo improved the code, avoiding the somewhat awkward passing of the atomic variable.
>
> Testing: gha, tier1-5
>
> Thanks,
> Thomas
src/hotspot/share/gc/shared/preservedMarks.cpp line 36:
> 34:
> 35: size_t PreservedMarks::restore() {
> 36: size_t result = size();
It seems to me that this is something the caller should do instead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29422#discussion_r2731887927
More information about the hotspot-gc-dev
mailing list