[lilliput-jdk17u:lilliput] RFR: 8308107: [Lilliput/JDK17] Cherry-pick: 8291555: Implement alternative fast-locking scheme [v3]

Roman Kennke rkennke at openjdk.org
Mon May 22 17:55:05 UTC 2023


On Mon, 22 May 2023 11:28:31 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Also cross-compiled builds are failing -- I think some point to the actual problems.

Yeah, but none of them relate to changes done in this PR. Should be fixed separately, IMO.

> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 770:
> 
>> 768:   movptr(boxReg, Address(tmpReg, OM_OFFSET_NO_MONITOR_VALUE_TAG(EntryList)));
>> 769:   orptr(boxReg, Address(tmpReg, OM_OFFSET_NO_MONITOR_VALUE_TAG(cxq)));
>> 770:   jccb  (Assembler::notZero, DONE_LABEL);
> 
> Why this change?

Because the code is arranged differently now. If we branched to CheckSucc, we would end up in the stack-locked path, which is incorrect. We really want to branch to DONE. That's also what we do in upstream JDK21 (I believe there has been some cleanup between 17 and 21 that fixed that).

> src/hotspot/share/oops/klass.hpp line 655:
> 
>> 653:   // prototype markWord. If biased locking is enabled it may further be
>> 654:   // biasable and have an epoch.
>> 655:   markWord prototype_header() const      { return _prototype_header; }
> 
> Why this change? This does not relate to fast-locking scheme?

Right. This is a change that should be done in a separate PR. Thing is that in 17 we could call this method if anybody enabled +UseBiasedLocking, and the assert would fail.

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

PR Comment: https://git.openjdk.org/lilliput-jdk17u/pull/19#issuecomment-1557646165
PR Review Comment: https://git.openjdk.org/lilliput-jdk17u/pull/19#discussion_r1200837325
PR Review Comment: https://git.openjdk.org/lilliput-jdk17u/pull/19#discussion_r1200839025


More information about the lilliput-dev mailing list