RFR: 8373941: Epsilon: Robust counter updates in early VM phases
Stefan Karlsson
stefank at openjdk.org
Fri Jan 9 08:49:29 UTC 2026
On Tue, 6 Jan 2026 10:38:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> See more details in the bug. This PR makes the counters updated on allocation path more robust. New regression test captures the original failure (intermittently). This would be also backported to JDK 26.
>
> Additional testing:
> - [x] Linux x86_64 server fastdebug, `gc/epsilon`, 100x
> - [x] Linux x86_64 server fastdebug, `runtime/cds/appcds/TestEpsilonGCWithCDS.java`, 100x
> - [x] Linux x86_64 server fastdebug, `gc/epsilon/TestInitAllocs.java`, 1000x
Looks good to me.
Kim would probably prefer if you changed the `volatile bool _ready` to use the new `Atomic<bool>` class.
src/hotspot/share/gc/epsilon/epsilonHeap.cpp line 158:
> 156: // At this point, some diagnostic subsystems might not yet be initialized.
> 157: // We pretend the printout happened either way. This keeps allocation path
> 158: // from obscessively checking the subsystems status on every allocation.
Suggestion:
// from obsessively checking the subsystem's status on every allocation.
-------------
Marked as reviewed by stefank (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29061#pullrequestreview-3642939859
PR Review Comment: https://git.openjdk.org/jdk/pull/29061#discussion_r2675335690
More information about the hotspot-gc-dev
mailing list