RFR: 8308479: [s390x] Implement alternative fast-locking scheme

Amit Kumar amitkumar at openjdk.org
Mon Jun 12 11:12:08 UTC 2023


This PR implements new fast-locking scheme for s390x. Additionally few parameters have been renamed to be in sync with PPC.

Testing done (for release, fastdebug and slowdebug build):
All `test/jdk/java/util/concurrent` test with parameters:
* LockingMode=2 
* LockingMode=2 with -Xint
* LockingMode=2 with -XX:TieredStopAtLevel=1

Result is consistently similar to Aarch(MacOS) and PPC, All of 124 tests are passing except `MapLoops.java` because in the 2nd part for this testcase, jvm is started with `HeavyMonitors` which conflict with `LockingMode=2`

**LockingMode=2 with -XX:-TieredCompilation** 
With C2 compiler there is issue with `ConcurrentAssociateTest.java` test. In `compiler_fast_unlock_object` method before checking for locking mode, there is a check for `Monitor-Value` which is somehow being passed and because of this sometime test crashes with `stop("Header is not fast-locked");`, for now to tackle with this, I written that check again before making a call to `fast_unlock()` method, It isn't a reliable fix, but somehow solves the issue. but I'm hoping to get more insights form the comments & reviews.

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

Commit messages:
 - s390x Port

Changes: https://git.openjdk.org/jdk/pull/14414/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14414&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8308479
  Stats: 327 lines in 6 files changed: 206 ins; 21 del; 100 mod
  Patch: https://git.openjdk.org/jdk/pull/14414.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14414/head:pull/14414

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


More information about the hotspot-dev mailing list