RFR: 8344526: RISC-V: implement -XX:+VerifyActivationFrameSize [v3]

Hamlin Li mli at openjdk.org
Wed Nov 20 10:41:21 UTC 2024


On Wed, 20 Nov 2024 06:48:58 GMT, SendaoYan <syan at openjdk.org> wrote:

>> Hi all,
>> Currently on linux-riscv64 platform the debug VM option `-XX:+VerifyActivationFrameSize` is Unimplemented. I want to implement `-XX:+VerifyActivationFrameSize` to make JVM easier to diagnose. Only effect debug build plus with option `-XX:+VerifyActivationFrameSize`, the change has been verified locally, the risk is low.
>> 
>> Additional testing
>> 
>> - [x] Run SPECjbb2015 with -XX:+VerifyActivationFrameSize option
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   make exclude 2 frame metadata after "fp -esp"

Looks good, just one minor comment.

src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 447:

> 445:     sub(t1, fp, esp);
> 446:     sub(t1, t1, frame::metadata_words * wordSize); // Exclude 2 frame metadata words
> 447:     int min_frame_size = (frame::link_offset - frame::interpreter_frame_initial_sp_offset) * wordSize;

Could we also remove the above `sub`, and add `frame::metadata_words * wordSize` in this statement? it's not necessary to calculate the value in the generated code and seems to me the code will be more straight.

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

PR Review: https://git.openjdk.org/jdk/pull/22264#pullrequestreview-2448220536
PR Review Comment: https://git.openjdk.org/jdk/pull/22264#discussion_r1850056604


More information about the hotspot-compiler-dev mailing list