RFR: 8376969: Shenandoah: GC state getters should be inlineable

Aleksey Shipilev shade at openjdk.org
Mon Feb 2 17:37:41 UTC 2026


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 semantics change.

Additional testing:
 - [x] Eye-balling barrier profiles on targeted microbenchmarks
 - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/29526/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29526&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8376969
  Stats: 25 lines in 3 files changed: 11 ins; 12 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/29526.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29526/head:pull/29526

PR: https://git.openjdk.org/jdk/pull/29526


More information about the shenandoah-dev mailing list