RFR: 8310513: [s390x] Intrinsify recursive ObjectMonitor locking [v2]

Martin Doerr mdoerr at openjdk.org
Tue Apr 9 10:41:04 UTC 2024


On Mon, 8 Apr 2024 16:28:38 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> s390 implementation of [JDK-8277180](https://bugs.openjdk.org/browse/JDK-8277180). PPC implementation for the same: https://github.com/openjdk/jdk/pull/7305
>> 
>> I had tested `tier1` on `fastdebug`, `release` vm. 
>> 
>> BenchMarking: 
>> 
>> 
>> ./build/linux-s390x-server-release/jdk/bin/java -Xms4g -Xmx4g -jar dacapo-9.12-MR1-bach.jar h2 -s huge -t 1 -n 1
>> 
>> without patch: 
>> ===== DaCapo 9.12-MR1 h2 PASSED in 223023 msec =====
>> ===== DaCapo 9.12-MR1 h2 PASSED in 225686 msec =====
>> ===== DaCapo 9.12-MR1 h2 PASSED in 219824 msec =====
>> ===== DaCapo 9.12-MR1 h2 PASSED in 226719 msec =====
>> 
>> 
>> 
>> with patch: 
>> ===== DaCapo 9.12-MR1 h2 PASSED in 167816 msec =====
>> ===== DaCapo 9.12-MR1 h2 PASSED in 174368 msec =====
>> ===== DaCapo 9.12-MR1 h2 PASSED in 170517 msec =====
>> ===== DaCapo 9.12-MR1 h2 PASSED in 169349 msec =====
>
> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   suggestion from Lutz

I couldn't spot any bugs.

src/hotspot/cpu/s390/macroAssembler_s390.cpp line 3274:

> 3272:   // Otherwise, register zero is filled with the current owner.
> 3273:   z_lghi(zero, 0);
> 3274:   z_csg(zero, Z_thread, OM_OFFSET_NO_MONITOR_VALUE_TAG(owner), monitor_tagged);

May be a bit confusing that `zero` contains the owner, but I can live with it.

src/hotspot/cpu/s390/macroAssembler_s390.cpp line 3289:

> 3287:   // Current thread already owns the lock. Just increment recursion count.
> 3288:   z_agsi(Address(monitor_tagged, OM_OFFSET_NO_MONITOR_VALUE_TAG(recursions)), 1ll);
> 3289:   z_cgr(zero, zero); // restore CC

`// set the CC to EQUAL` would be better, but ok.

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

Marked as reviewed by mdoerr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17975#pullrequestreview-1988706162
PR Review Comment: https://git.openjdk.org/jdk/pull/17975#discussion_r1557414344
PR Review Comment: https://git.openjdk.org/jdk/pull/17975#discussion_r1557414941


More information about the hotspot-dev mailing list