RFR: 8278411: Implement UseHeavyMonitors consistently, s390 port

Martin Doerr mdoerr at openjdk.org
Mon May 15 13:01:47 UTC 2023


On Mon, 15 May 2023 11:33:08 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> This PR make s390x to adapt the changes done in [JDK-8276901](https://bugs.openjdk.org/browse/JDK-8276901) OR implements UseHeavyMonitors. 
>> 
>> [JDK-8291555](https://bugs.openjdk.org/browse/JDK-8291555) still needs Porting effort. As for `LM_LIGHTWEIGHT` locking mode, code is Unimplemented.
>
> src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp line 107:
> 
>> 105:     Unimplemented();
>> 106:   } else if (LockingMode == LM_LEGACY) {
>> 107:     NearLabel done;
> 
> I don't understand: should "consistent handling of UseHeavyMonitors" not lead to LM_MONITOR be handled here? E.g. by directly jumping into the slow case, without bothering with stack locking?

I was confused about this, too. But, `LM_MONITOR` is already checked in `LIR_Assembler::emit_lock` and `LIR_Assembler::emit_unwind_handler()`, so we don't reach here. x86 and aarch64 have a similar implementation. I think we could at least assert that LockingMode != LM_MONITOR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13978#discussion_r1193801284


More information about the hotspot-compiler-dev mailing list