RFR: 8375983: G1: Convert G1ConcurrentRefineStats to use Atomic<T>
Kim Barrett
kbarrett at openjdk.org
Wed Jan 21 17:00:36 UTC 2026
On Wed, 21 Jan 2026 13:22:07 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this change that converts `G1ConcurrentRefineStats` to use `Atomic<T>`.
>
> The only notable thing is that there has been need to expand the assignment in `reset()` since the assignment operator for `Atomic<T>` is not defined, and I did not see it worth adding one.
>
> Testing: gha
>
> Thanks,
> Thomas
Looks good. Some optional whitespace adjustments.
src/hotspot/share/gc/g1/g1ConcurrentRefineStats.hpp line 56:
> 54: // but not yield time).
> 55: jlong sweep_duration() const { return _sweep_duration.load_relaxed() - yield_during_sweep_duration(); }
> 56: jlong yield_during_sweep_duration() const { return _yield_during_sweep_duration.load_relaxed(); }
Consider some line breaks to reduce line lengths. There are some more long lines below too.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29347#pullrequestreview-3688346706
PR Review Comment: https://git.openjdk.org/jdk/pull/29347#discussion_r2713482620
More information about the hotspot-gc-dev
mailing list