[riscv-port] RFR: 8281632: riscv: Improve interpreter stack banging

Yadong Wang yadongwang at openjdk.java.net
Tue Feb 22 12:39:25 UTC 2022


On Tue, 22 Feb 2022 06:41:20 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> With reference to https://bugs.openjdk.java.net/browse/JDK-8072070, there is the same issue on the riscv platform.
>>  
>> 
>> Every time we enter a method in interpreter, we bang a lot of stack ahead for shadow zone checks. I believe this could be made significantly better, e.g. by checking how far away we are from the stack_overflow_limit.
>> 
>> 
>> Hotspot/jdk tier1 passed on unmatched, and all jtreg cases were tested on Qemu without new failures.
>> 
>> Performed the performance regression test in SPECjvm2008 sunflow, and achieved 17% improvement in the interpreter-only mode.
>
> src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp line 910:
> 
>> 908:   __ stop("shadow zone safe limit is not initialized");
>> 909:   __ bind(L_good_limit);
>> 910: #endif
> 
> The x86 patch also verifies `shadow_zone_growth_watermark()`, do you want to do the same?
> 
> https://github.com/openjdk/jdk/commit/3a13425bc9088cbb6d95e1a46248d7eba27fb1a6#diff-b43598c71e4c69b246ff38275b5d421bcbbc3141216aa03f50fc747dd2635922R742-R746

Yes, I missed the logic.

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

PR: https://git.openjdk.java.net/riscv-port/pull/58


More information about the riscv-port-dev mailing list