RFR: 8280872: Reorder code cache segments to improve code density [v6]

Boris Ulasevich bulasevich at openjdk.java.net
Thu Mar 24 13:30:51 UTC 2022


On Fri, 18 Mar 2022 12:58:01 GMT, Evgeny Astigeevich <duke at openjdk.java.net> wrote:

>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 399:
>> 
>>> 397:   }
>>> 398:   // codecache size: 128M..240M
>>> 399:   return !CodeCache::is_non_nmethod(addr);
>> 
>> Is it possible to further refine this to also catch calls from C1 to C1 and C2 to C2 which obviously wouldn't need a far call as well?
>
> I believe they should be our next steps to guarantee we don't generate redundant code for such cases.

Good catch. But I see a little problem here. CodeCache is aksed for a room in profiled segment for C1 methods, but it places method to the non_profiled segment when the profiled segment is full (and same whay C2 method can be placed in profiled segment). So we can not know in advance where will be the final place for the generated method.

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

PR: https://git.openjdk.java.net/jdk/pull/7517


More information about the hotspot-dev mailing list