RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v15]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Thu Sep 19 17:23:50 UTC 2024


On Wed, 18 Sep 2024 12:08:46 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 2576:
>> 
>>> 2574:   } else {
>>> 2575:     lea(dst, Address(obj, index, Address::lsl(scale)));
>>> 2576:     ldr(dst, Address(dst, offset));
>> 
>> Do you have a reproducer (or, better yet, a test case) that exercises this case? I ran Oracle's internal CI tiers 1-5 and could never hit it. Could this happen for x64 as well?
>
> AFAIK, this happens only when using compressed oops with a heap-base in r27. When running with that setting, we would get addresses like r27[nklass] or r27[nklass]+offset, both with scale=8. You would need large heaps, perhaps >4GB, to get this coops setting. The problem with aarch64 is that we can't have an address like  r27[nklass]+offset, that's why we need to lea the r27[nklass] part first.
> Yes, this also happens on x86, but x86 supports  rX[nklass]+offset addressing.

Thanks @rkennke, I tried running test tiers 1-3 using different compressed OOPs configurations but could not reach this code, unfortunately. Could you provide a reproducer? The reason I am particularly interested is because I'd like to find whether there could be any problematic interaction with C2's implicit null check optimization.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1767315114


More information about the build-dev mailing list