RFR: 8377048: Shenandoah: shenandoahLock related improvments [v2]
Xiaolong Peng
xpeng at openjdk.org
Tue Feb 3 23:35:15 UTC 2026
> While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371.
>
> Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock.
>
> Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel
>
> ### Test
> - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah
> - [x] GHA
Xiaolong Peng has updated the pull request incrementally with three additional commits since the last revision:
- Address review comments
- Remove unintentional spaces
- Remove unintended lock in ShenandoahRegionPartitions::assert_bounds
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/29543/files
- new: https://git.openjdk.org/jdk/pull/29543/files/44bdd69a..14cbd3ed
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=00-01
Stats: 11 lines in 4 files changed: 7 ins; 2 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/29543.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29543/head:pull/29543
PR: https://git.openjdk.org/jdk/pull/29543
More information about the shenandoah-dev
mailing list