[lworld] Integrated: 8366879: [lworld] C2's lock elimination fails after JDK-8335256
Tobias Hartmann
thartmann at openjdk.org
Fri Sep 5 06:10:36 UTC 2025
On Thu, 4 Sep 2025 12:19:34 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Since [JDK-8335256](https://bugs.openjdk.org/browse/JDK-8335256) / https://github.com/openjdk/valhalla/pull/1447 we attempt lock elimination already before Escape Analysis. However, allocations of locked objects might block lock elimination if their escape state isn't determined yet and we only got one chance at eliminating the lock:
> https://github.com/openjdk/valhalla/blob/1207841579be65b56c3e18d8d13453dd507d6a74/src/hotspot/share/opto/macro.cpp#L3001-L3004
>
> I changed the code such that we only attempt lock elimination after EA and added a corresponding regression test.
>
> Thanks,
> Tobias
This pull request has now been integrated.
Changeset: 858be301
Author: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/858be30119bd5bc37a69d16042523f53bea71a36
Stats: 107 lines in 5 files changed: 82 ins; 9 del; 16 mod
8366879: [lworld] C2's lock elimination fails after JDK-8335256
-------------
PR: https://git.openjdk.org/valhalla/pull/1546
More information about the valhalla-dev
mailing list