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

Boris Ulasevich bulasevich at openjdk.java.net
Wed Apr 6 09:35:57 UTC 2022


On Tue, 5 Apr 2022 20:27:38 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> In a debug build the functionality does not work as expected. On AARCH64 branch range is +/-128MB. This is reflected by branch_range constant in [assembler_aarch64.hpp](https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/assembler_aarch64.hpp#L850). The issue is that for debug build the branch_range constant is intentionally modified to test trampolines, and my test fails because branches are encoded into three instructions starting at 2MB, not 128MB:
>> 
>>   // The maximum range of a branch is fixed for the AArch64
>>   // architecture.  In debug mode we shrink it in order to test
>>   // trampolines, but not so small that branches in the interpreter
>>   // are out of range.
>>   static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
>
> Got it.

Thank you!

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

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


More information about the hotspot-dev mailing list