RFR: 8291555: Implement alternative fast-locking scheme [v62]

Daniel D. Daugherty dcubed at openjdk.org
Wed Apr 26 21:08:21 UTC 2023


On Wed, 26 Apr 2023 11:00:33 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> How would I check if we are emitting code?
>> 
>> I am not sure I understand. The check for ANONYMOUS is only relevant when we observe an already-inflated monitor. I think this is the right place to put it.
>
> The entry barrier does this:
> 
> https://github.com/openjdk/jdk/blob/86f41a4c42268d364175263804eb4d1ce82fa943/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp#L139
> 
> `testptr(tmpReg, markWord::monitor_value)` is checking for inflation, and the following `if` block acts when inflation is detected, what I mean is to move the whole enclosed if down out of the `if (LockingMode != LM_MONITOR)`

It took a couple of re-reads to figure this out. You've added a scratch
emit size check before generating the C2HandleAnonOMOwnerStub.
For some reason, the way that GitHub shows those changes really
confused my brain...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1178116470


More information about the serviceability-dev mailing list