[lworld] Integrated: 8324114: [lworld] GTestWrapper.java fails with "assert(LockingMode == LM_LEGACY) failed: should only be called with legacy stack locking"
Christian Hagedorn
chagedorn at openjdk.org
Thu Feb 8 09:01:05 UTC 2024
On Fri, 19 Jan 2024 08:11:03 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> This patch fixes the gtests which fail with the lightweight locking mode (`-XX:LockingMode=2`) but also with heavy monitors (`-XX:LockingMode=0`). I've only noticed while working on this bug that in the meantime, we temporary enforce legacy stack-locking (`-XX:LockingMode=1`) since merging jdk-22+17:
> https://github.com/openjdk/valhalla/blob/16fa7709f15465e736dd3a83707ffe88d7bc61bd/src/hotspot/share/runtime/arguments.cpp#L1922-L1925
>
> Nevertheless, I think it's still worth to propose these test fixes now since we probably want to support lightweight locking at some point.
>
> The gtest used `markWork::has_locker()` which only works with `LM_LEGACY`. For `LM_LIGHTWEIGHT`, we need to call `markWord::is_fast_locked()`. Additionally, when running with `LM_MONITOR`, the test to match some things in the mark word fails because we only use heavy monitors and do not use the mark word bits.
>
> Thanks,
> Christian
This pull request has now been integrated.
Changeset: 170d8c68
Author: Christian Hagedorn <chagedorn at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/170d8c68c7a15ca3e7419b3cc435237658a83d10
Stats: 18 lines in 1 file changed: 14 ins; 0 del; 4 mod
8324114: [lworld] GTestWrapper.java fails with "assert(LockingMode == LM_LEGACY) failed: should only be called with legacy stack locking"
Reviewed-by: dsimms, thartmann
-------------
PR: https://git.openjdk.org/valhalla/pull/973
More information about the valhalla-dev
mailing list