RFR: 8277180: Intrinsify recursive ObjectMonitor locking for C2 x64 and A64 [v2]
Erik Österlund
eosterlund at openjdk.java.net
Wed Nov 17 10:43:35 UTC 2021
On Wed, 17 Nov 2021 10:13:19 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
>>
>> optimize AArch64 code
>
> src/hotspot/cpu/aarch64/aarch64.ad line 3872:
>
>> 3870: __ ldr(tmp, Address(disp_hdr, ObjectMonitor::recursions_offset_in_bytes() - markWord::monitor_value));
>> 3871: __ add(tmp, tmp, 1u);
>> 3872: __ str(tmp, Address(disp_hdr, ObjectMonitor::recursions_offset_in_bytes() - markWord::monitor_value));
>
> Suggestion:
>
> __ increment(Address(disp_hdr, ObjectMonitor::recursions_offset_in_bytes() - markWord::monitor_value));
The increment macro doesn't seem to utilize the fact that 1u can be encoded as an immediate to the add instruction. So it seems to generate worse code here. I'm okay with changing to increment anyway if you prefer that.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6406
More information about the hotspot-compiler-dev
mailing list