RFR: 8376969: Shenandoah: GC state getters should be inlineable
Xiaolong Peng
xpeng at openjdk.org
Mon Feb 2 22:56:04 UTC 2026
On Mon, 2 Feb 2026 17:29:49 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). Looks like some GC state checks we are using from the native barriers are not inlined into the fast-paths. This is very visible with smaller clones, for example. We should move GC state checks to appropriate .inline.hpp-s. Actually, I think these were inlineable before [JDK-8344055](https://bugs.openjdk.org/browse/JDK-8344055), so it is a minor regression in JDK 25.
>
> This PR does a pretty simple move, so I expect no semantic change.
>
> Additional testing:
> - [x] Eye-balling barrier profiles on targeted microbenchmarks
> - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah`
It looks good to me. I did test in gitfarm pipeline few months ago for the same change, but left it behind since I didn't see significant difference in the result, but it is still good to inline these two functions.
-------------
Marked as reviewed by xpeng (Committer).
PR Review: https://git.openjdk.org/jdk/pull/29526#pullrequestreview-3741970401
More information about the shenandoah-dev
mailing list