RFR: 8326235: RISC-V: Size CodeCache for short calls encoding
Fei Yang
fyang at openjdk.org
Tue Feb 20 11:08:53 UTC 2024
On Tue, 20 Feb 2024 08:28:18 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
> Hi, please consider.
>
> This limits the code cache to a size such that all code cache -> code cache calls and jump may always use auipc+jalr.
> (this is what we do in practice)
> Thus we can fix the encoding for those and not have variable encoding.
> The reduction of the size is just 2k, but due to option passing the real reduction is probably 1M.
> -XX:ReservedCodeCacheSize=2047M (down from 2048)
>
> Note, specifying '2G' gives the message:
>
>> Invalid ReservedCodeCacheSize=2048M. Must be at most 2047M.
>
> Manually test, no test I found uses this large code cache.
Thanks for fixing this potential risk. We will be more certain in code emitted for a cc -> cc call. In fact, I was also planning to do a similar fix for this very uncommon case :-)
-------------
Marked as reviewed by fyang (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17924#pullrequestreview-1890147505
More information about the hotspot-dev
mailing list