Integrated: 8377048: Shenandoah: shenandoahLock related improvments
Xiaolong Peng
xpeng at openjdk.org
Fri Feb 27 18:15:39 UTC 2026
On Tue, 3 Feb 2026 09:54:44 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:
> 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.
>
> 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
This pull request has now been integrated.
Changeset: a436287c
Author: Xiaolong Peng <xpeng at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a436287c139c88af1b570cc2738e3f33b8ec7fe6
Stats: 113 lines in 12 files changed: 38 ins; 22 del; 53 mod
8377048: Shenandoah: shenandoahLock related improvments
Reviewed-by: kdnilsen, wkemper
-------------
PR: https://git.openjdk.org/jdk/pull/29543
More information about the shenandoah-dev
mailing list