RFR: 8280872: Reorder code cache segments to improve code density [v2]
Evgeny Astigeevich
duke at openjdk.java.net
Mon Mar 7 13:22:01 UTC 2022
On Thu, 3 Mar 2022 12:07:54 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/icBuffer_aarch64.cpp line 55:
>>
>>> 53: Label l;
>>> 54: __ ldr(rscratch2, l);
>>> 55: __ far_jump(ExternalAddress(entry_point), NULL, rscratch1, true);
>>
>> This complicates `assemble_ic_buffer_code`. You need to know `far_jump` implementation, especially the generation of NOPs. I understand why we need those NOPs.
>> Do we have calls of non-nmethod code here?
>
> Yes, there are entry points from both non_method and method segments.
I suggest the following code:
int inst_count = __ far_jump(ExternalAddress(entry_point));
// IC stub code size is not expected to vary depending on target address.
// We use NOPs to make the size equal to ic_stub_code_size.
for (int i = 3 + inst_count; i < ic_stub_code_size(); ++i) {
__ nop();
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/7517
More information about the hotspot-dev
mailing list