RFR: 8291555: Replace stack-locking with fast-locking [v3]

Fei Yang fyang at openjdk.org
Mon Oct 17 04:33:08 UTC 2022


On Fri, 14 Oct 2022 15:39:41 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>>> > > > > > Here is the basic support for RISC-V: https://cr.openjdk.java.net/~shade/8291555/riscv-patch-1.patch
>>> > > > > > -- I adapted this from AArch64 changes, and tested it very lightly. @RealFYang, can I leave the testing and follow up fixes to you?
>>> > > > > 
>>> > > > > 
>>> > > > > @shipilev : Sure, I am happy to to that! Thanks for porting this to RISC-V :-)
>>> > > > 
>>> > > > 
>>> > > > @shipilev : After applying this on today's jdk master, linux-riscv64 fastdebug fail to build on HiFive Unmatched. I see JVM crash happens during the build process. I suppose you carried out the test with some release build, right?
>>> > > 
>>> > > 
>>> > > Have you applied the whole PR? Or only the patch that @shipilev provided. Because only the patch without the rest of the PR is bound to fail.
>>> > 
>>> > 
>>> > Yes, the whole PR: https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/10590.diff
>>> 
>>> The PR reports a merge conflict in risc-v code, when applied vs latest tip. Have you resolved that? GHA (which includes risc-v) is happy, otherwise.
>> 
>> @rkennke :
>> I did see some "Hunk succeeded" messages for the risc-v part when applying the change with: $ patch -p1 < ~/10590.diff
>> But I didn't check whether that will cause a problem here.
>> 
>> 
>> patching file src/hotspot/cpu/riscv/c1_CodeStubs_riscv.cpp
>> patching file src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp
>> patching file src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp
>> patching file src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp
>> Hunk #1 succeeded at 58 (offset -1 lines).
>> Hunk #2 succeeded at 67 (offset -1 lines).
>> patching file src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp
>> patching file src/hotspot/cpu/riscv/interp_masm_riscv.cpp
>> patching file src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
>> Hunk #1 succeeded at 2499 (offset 324 lines).
>> Hunk #2 succeeded at 4474 (offset 330 lines).
>> patching file src/hotspot/cpu/riscv/macroAssembler_riscv.hpp
>> Hunk #1 succeeded at 869 with fuzz 2 (offset 313 lines).
>> Hunk #2 succeeded at 1252 (offset 325 lines).
>> patching file src/hotspot/cpu/riscv/riscv.ad
>> Hunk #1 succeeded at 2385 (offset 7 lines).
>> Hunk #2 succeeded at 2407 (offset 7 lines).
>> Hunk #3 succeeded at 2433 (offset 7 lines).
>> Hunk #4 succeeded at 10403 (offset 33 lines).
>> Hunk #5 succeeded at 10417 (offset 33 lines).
>> patching file src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
>> Hunk #1 succeeded at 975 (offset 21 lines).
>> Hunk #2 succeeded at 1030 (offset 21 lines).
>> Hunk #3 succeeded at 1042 (offset 21 lines).
>> Hunk #4 succeeded at 1058 (offset 21 lines).
>> Hunk #5 succeeded at 1316 (offset 24 lines).
>> Hunk #6 succeeded at 1416 (offset 24 lines).
>> Hunk #7 succeeded at 1492 (offset 24 lines).
>> Hunk #8 succeeded at 1517 (offset 24 lines).
>> Hunk #9 succeeded at 1621 (offset 24 lines).
>
>> > > > > > > Here is the basic support for RISC-V: https://cr.openjdk.java.net/~shade/8291555/riscv-patch-1.patch
>> > > > > > > -- I adapted this from AArch64 changes, and tested it very lightly. @RealFYang, can I leave the testing and follow up fixes to you?
>> > > > > > 
>> > > > > > 
>> > > > > > @shipilev : Sure, I am happy to to that! Thanks for porting this to RISC-V :-)
>> > > > > 
>> > > > > 
>> > > > > @shipilev : After applying this on today's jdk master, linux-riscv64 fastdebug fail to build on HiFive Unmatched. I see JVM crash happens during the build process. I suppose you carried out the test with some release build, right?
>> > > > 
>> > > > 
>> > > > Have you applied the whole PR? Or only the patch that @shipilev provided. Because only the patch without the rest of the PR is bound to fail.
>> > > 
>> > > 
>> > > Yes, the whole PR: https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/10590.diff
>> > 
>> > 
>> > The PR reports a merge conflict in risc-v code, when applied vs latest tip. Have you resolved that? GHA (which includes risc-v) is happy, otherwise.
>> 
>> @rkennke : I did see some "Hunk succeeded" messages for the risc-v part when applying the change with: $ patch -p1 < ~/10590.diff But I didn't check whether that will cause a problem here.
> 
> If you take the latest code from this PR, it would already have the patch applied. No need to patch it again.

@rkennke : Could you please add this follow-up fix for RISC-V? I can build fastdebug on HiFive Unmatched board with this fix now and run non-trivial benchmark workloads. I will carry out more tests. 

[riscv-patch-2.txt](https://github.com/openjdk/jdk/files/9796886/riscv-patch-2.txt)

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

PR: https://git.openjdk.org/jdk/pull/10590


More information about the serviceability-dev mailing list