RFR: 8341715: PPC64: ObjectMonitor::_owner should be reset unconditionally in nmethod unlocking

Richard Reingruber rrich at openjdk.org
Tue Oct 15 06:55:37 UTC 2024


This removes the `ObjectMonitor::_owner` check when a nmethod unlocks an inflated monitor on ppc64.
Monitor operations by nmethods are guaranteed to be balanced (see JBS-item for a reference) therefore the check is redundant. Other platforms don't have it either.

I've removed the assertion that the unlocking thread owns the monitor again because it won't work with vthread monitor support in the loom repository.

The fix passed our CI testing with `LockingMode` set to `LM_LEGACY`
Tier1-4 of hotspot and jdk. All of Langtools and jaxp. Renaissance Suite and SAP specific tests.
Testing was done on the main platforms and also on Linux/PPC64le and AIX.

The test runtime/logging/MonitorInflationTest.java failed on all platforms. Apparently it has issues with `LM_LEGACY`.

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

Commit messages:
 - Remove assertion
 - compiler_fast_unlock_object: no need to check ObjectMonitor::_owner

Changes: https://git.openjdk.org/jdk/pull/21494/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21494&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8341715
  Stats: 33 lines in 1 file changed: 26 ins; 7 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/21494.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21494/head:pull/21494

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


More information about the hotspot-compiler-dev mailing list