RFR: 8343805: RISC-V: JVM crashes on startup when disabling compressed instructions [v2]

Hamlin Li mli at openjdk.org
Tue Nov 12 09:35:38 UTC 2024


On Tue, 12 Nov 2024 06:44:26 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Hello, please review this trivial change.
>> 
>> The reason of the crash is that we will use more space for compiler stubs during stubRoutines generation when compressed instructions is disabled expecially when the CPU is not equipped with the RISC-V B extension. So this simply increases the reserved size of compiler stubs for this CPU platform. After this change, we have (without B extension):
>> 
>> 
>> $ java -Xlog:stubs -XX:-UseRVC -version
>> [0.010s][info][stubs] StubRoutines (initial stubs)       [0x0000003f8f3cf340, 0x0000003f8f3d1cd0] used: 604, free: 10036
>> [0.117s][info][stubs] StubRoutines (continuation stubs)  [0x0000003f8f3d25c0, 0x0000003f8f3d3010] used: 628, free: 2012
>> [0.153s][info][stubs] StubRoutines (final stubs)         [0x0000003f8f4025c0, 0x0000003f8f409d70] used: 9380, free: 21260
>> [0.199s][info][stubs] StubRoutines (compiler stubs)      [0x0000003f8f4d7c40, 0x0000003f8f4e3180] used: 38924, free: 7476
>> 
>> 
>> (PS: Same issue also triggers when building without ZGC (`--disable-jvm-feature-zgc`))
>
> Fei Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add more space for hardware platforms with vector extension

Thanks for catching and fix.
Just one minor comment.

src/hotspot/cpu/riscv/stubRoutines_riscv.hpp line 42:

> 40:   _initial_stubs_code_size      = 10000,
> 41:   _continuation_stubs_code_size =  2000,
> 42:   _compiler_stubs_code_size     = 45000,

Hey, why do we remove the `ZGC_ONLY` here?

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

PR Review: https://git.openjdk.org/jdk/pull/21966#pullrequestreview-2429041244
PR Review Comment: https://git.openjdk.org/jdk/pull/21966#discussion_r1837761273


More information about the hotspot-compiler-dev mailing list