RFR: 8319900: Recursive lightweight locking: riscv64 implementation
Gui Cao
gcao at openjdk.org
Mon Feb 26 02:44:01 UTC 2024
Implementation of recursive lightweight JDK-8319796 for linux-riscv64.
### Correctness testing:
- [x] Run tier1-3, hotspot:tier4 tests with -XX:LockingMode=1 & -XX:LockingMode=2 on LicheePI 4A (release)
- [x] Run tier1-3 tests with -XX:LockingMode=1 & -XX:LockingMode=2 on qemu 8.1.0 (fastdebug)
### JMH tested on LicheePI 4A:
Before (LockingMode = 2):
Benchmark (innerCount) Mode Cnt Score Error Units
LockUnlock.testContendedLock 100 avgt 12 281.603 ± 2.626 ns/op
LockUnlock.testRecursiveLockUnlock 100 avgt 12 196373.917 ± 4669.241 ns/op
LockUnlock.testRecursiveSynchronization 100 avgt 12 274.492 ± 6.049 ns/op
LockUnlock.testSerialLockUnlock 100 avgt 12 11516.092 ± 69.964 ns/op
LockUnlock.testSimpleLockUnlock 100 avgt 12 11490.789 ± 58.833 ns/op
After (LockingMode = 2):
Benchmark (innerCount) Mode Cnt Score Error Units
LockUnlock.testContendedLock 100 avgt 12 307.013 ± 3.259 ns/op
LockUnlock.testRecursiveLockUnlock 100 avgt 12 59047.222 ± 94.748 ns/op
LockUnlock.testRecursiveSynchronization 100 avgt 12 259.789 ± 1.698 ns/op
LockUnlock.testSerialLockUnlock 100 avgt 12 6055.775 ± 13.518 ns/op
LockUnlock.testSimpleLockUnlock 100 avgt 12 6090.986 ± 67.179 ns/op
Before (LockingMode = 1):
Benchmark (innerCount) Mode Cnt Score Error Units
LockUnlock.testContendedLock 100 avgt 12 286.144 ± 2.490 ns/op
LockUnlock.testRecursiveLockUnlock 100 avgt 12 68058.259 ± 286.262 ns/op
LockUnlock.testRecursiveSynchronization 100 avgt 12 263.132 ± 4.075 ns/op
LockUnlock.testSerialLockUnlock 100 avgt 12 7521.777 ± 35.193 ns/op
LockUnlock.testSimpleLockUnlock 100 avgt 12 7522.480 ± 26.310 ns/op
After (LockingMode = 1):
Benchmark (innerCount) Mode Cnt Score Error Units
LockUnlock.testContendedLock 100 avgt 12 289.034 ± 5.821 ns/op
LockUnlock.testRecursiveLockUnlock 100 avgt 12 68474.370 ± 495.135 ns/op
LockUnlock.testRecursiveSynchronization 100 avgt 12 261.052 ± 4.560 ns/op
LockUnlock.testSerialLockUnlock 100 avgt 12 7513.187 ± 19.524 ns/op
LockUnlock.testSimpleLockUnlock 100 avgt 12 7461.287 ± 118.634 ns/op
-------------
Commit messages:
- Merge branch 'master' into JDK-8319900
- improve code
- Polish code comment
- 8319900: Recursive lightweight locking: riscv64 implementation
Changes: https://git.openjdk.org/jdk/pull/17554/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17554&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8319900
Stats: 613 lines in 9 files changed: 411 ins; 114 del; 88 mod
Patch: https://git.openjdk.org/jdk/pull/17554.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17554/head:pull/17554
PR: https://git.openjdk.org/jdk/pull/17554
More information about the hotspot-dev
mailing list