RFR: 8291555: Replace stack-locking with fast-locking [v3]
Roman Kennke
rkennke at openjdk.org
Tue Oct 11 20:01:33 UTC 2022
On Tue, 11 Oct 2022 13:25:30 GMT, Aleksey Shipilev <shade 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/fast-locking' into fast-locking
>> - Re-use r0 in call to unlock_object()
>
> src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 272:
>
>> 270: // SharedRuntime::OSR_migration_begin() packs BasicObjectLocks in
>> 271: // the OSR buffer using 2 word entries: first the lock and then
>> 272: // the oop.
>
> This comment is now irrelevant?
Yes, removed it there and in same files in other arches.
> src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 432:
>
>> 430: if (method()->is_synchronized()) {
>> 431: monitor_address(0, FrameMap::r0_opr);
>> 432: __ ldr(r4, Address(r0, BasicObjectLock::obj_offset_in_bytes()));
>
> Do we have to use a new register here, or can we just reuse `r0`?
r0 is used below in call to unlock_object(), but not actually used there. I shuffled it a little and re-use r0 now.
> src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp line 1886:
>
>> 1884:
>> 1885: __ mov(c_rarg0, obj_reg);
>> 1886: __ mov(c_rarg1, rthread);
>
> Now that you dropped an argument here, you need to do `__ call_VM_leaf` with `2`, not with `3` arguments?
Good catch! Yes.
-------------
PR: https://git.openjdk.org/jdk/pull/10590
More information about the serviceability-dev
mailing list