RFR: 8291555: Implement alternative fast-locking scheme [v21]
Roman Kennke
rkennke at openjdk.org
Thu Mar 16 12:24:35 UTC 2023
On Sat, 11 Mar 2023 14:57:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/JDK-8291555-v2' into JDK-8291555-v2
>> - Use nullptr instead of NULL in touched code (shared)
>
> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 6234:
>
>> 6232:
>> 6233: // Load (object->mark() | 1) into hdr
>> 6234: orr(hdr, hdr, markWord::unlocked_value);
>
> I wondered why this is needed. Should we not have the header of an unloaded object in hdr? Or is this a safeguard against a misuse of this function (called with the header of an already locked object)?
It could be a monitor-locked header. In C2 this is not possible and we *could* save an instruction here, I guess. Not sure if it is worth it, though.
-------------
PR: https://git.openjdk.org/jdk/pull/10907
More information about the serviceability-dev
mailing list