[riscv-port-jdk11u:riscv-port] RFR: 8276799: Implementation of JEP 422: Linux/RISC-V Port [v10]

Xiaolin Zheng xlinzheng at openjdk.org
Wed Feb 7 16:55:12 UTC 2024


On Thu, 1 Feb 2024 06:49:00 GMT, kuaiwei <duke at openjdk.org> wrote:

>> It's the initial patch based on https://github.com/openjdk/jdk17u-dev/pull/1427 , and revert patches not required in JDK11u. The testing is running on a linux riscv board. There are some failed cases and we are working on fix them , the progress will updated.
>> 
>> Thanks the contribution of OpenJDK community and hard working of @zhengxiaolinX .
>> 
>> - [x]  slowdebug/fastdebug/release build
>> - [x] Benchmark: SPECJbb2015, Renaissance
>> - [x]  Tier1 tests
>> - [x] Tier2 tests
>> - [x] Tier3 tests
>> - [ ] Tier4 tests
>
> kuaiwei has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 145 commits:
> 
>  - Remove unused zSyscall_linux_riscv.hpp
>  - Merge riscv-port
>  - Merge branch 'port_jdk11u_initial_patch' of github.com:kuaiwei/riscv-port-jdk11u into kw_initial_patch
>  - Merge branch 'openjdk:master' into port_jdk11u_initial_patch
>  - Merge riscv-port
>  - Revert JDK-8247533: SA stack walking sometimes fails with sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
>  - Fix test error after port 8295926
>  - 8295926: RISC-V: C1: Fix LIRGenerator::do_LibmIntrinsic
>    
>    Reviewed-by: yadongwang, fyang
>  - 8293100: RISC-V: Need to save and restore callee-saved FloatRegisters in StubGenerator::generate_call_stub
>    
>    Reviewed-by: yadongwang, fjiang, shade, vkempik
>  - Merge riscv-port
>  - ... and 135 more: https://git.openjdk.org/riscv-port-jdk11u/compare/a0a61dda...4b01e137

> I checked and it seems that this contains fixes for the following two issues: ... https://bugs.openjdk.org/browse/JDK-8291952: riscv: Remove PRAGMA_NONNULL_IGNORED
0. For [JDK-8291952: riscv: Remove PRAGMA_NONNULL_IGNORED](https://bugs.openjdk.org/browse/JDK-8291952): Yes you are right. This one is contained but [wrongly documented](https://github.com/openjdk/riscv-port-jdk11u/pull/3/commits/49000a43408aba29d3dc9ee4e03219e6f85be602) in the commit of this PR. It should've been a port instead of a revert.

> Also I don't understand why we have the following two issues in the list?

1. For [JDK-8243155: AArch64: Add support for SqrtVF](https://bugs.openjdk.org/browse/JDK-8243155), it is committed to the [upstream](https://github.com/openjdk/jdk/commit/e93cd7ed3c4810b6f48777d39f61644999ebb691) and only the first line of it is needed for us, and it then got backported to [JDK11u](https://github.com/openjdk/jdk11u-dev/commit/4d305000492d6b2e6b068f464b6c807166b781f2). The initial load of the RISC-V backend lacks this, so needs a [port](https://github.com/openjdk/riscv-port-jdk11u/pull/3/commits/99ca43f1e7e74f161b40466f49fc61aa734d334d) for that line.
2. For [JDK-8202976: Add C1 lea patching support for x86](https://bugs.openjdk.org/browse/JDK-8202976), when backporting the code to 11u, noticing that the RISC-V initial patch on JDK19 didn't contain that as well, I added [the trivial assertion](https://github.com/openjdk/riscv-port-jdk11u/pull/3/commits/58ad930e78501c6fad024e7ef05066ec19eb6219) from it by the way. It's not important at all. But for the record's sake, I still added a commit entry for that. Again, it is not important at all so actually whether dropping the issue or remaining it is okay...

> Hi, I think you should add this issue https://bugs.openjdk.org/browse/JDK-8308277, to replace JDK-8243155

3. This is fine, one is the AArch64 original code and the other is the RISC-V ported code. Redirecting to the latter one is fine. Thank you.

> Hi, Maybe you forgot to add issue: 8282306, 8301313, 8308277, 8310873

4. For [JDK-8282306: os::is_first_C_frame(frame*) crashes on invalid link access](https://bugs.openjdk.org/browse/JDK-8282306): the original RISC-V initial patch on JDK19 [contains this patch](https://github.com/openjdk/jdk/blob/5905b02c0e2643ae8d097562f181953f6c88fc89/src/hotspot/cpu/riscv/frame_riscv.inline.hpp#L146-L149). Then, the issue got backported to [JDK11u](https://github.com/openjdk/jdk11u-dev/commit/7c664bcd82cf2a13c9fdcd803345c6095e4d3873). So, after backporting the RISC-V backend, they naturally merged together without changes needed. Subtle, but adding this issue to the list of this PR is fine I think, by aligning with the JDK17u PR.

5. For [JDK-8301313: RISC-V: C2: assert(false) failed: bad AD file due to missing match rule](https://bugs.openjdk.org/browse/JDK-8301313): Sorry I don't get this one... The [original code](https://github.com/openjdk/jdk/commit/3ad6aef1496de914b70f00005465e4b22f248d4f) here doesn't seem to exist in this PR?

6. For 8308277: Discussed in the 3rd item and it is fine.

7. For [JDK-8310873: Re-enable locked_create_entry symbol check in runtime/NMT/CheckForProperDetailStackTrace.java for RISC-V](https://bugs.openjdk.org/browse/JDK-8310873): The [upstream code](https://github.com/openjdk/jdk/commit/87e6fab2c498558d4593f6c0537c998a61779aaf) doesn't seem to exist in this initial patch, which is the same as the 5th item.

So finally and in summary, is adding issues `8291952, 8308277, 8282306` and dropping issues `8243155, 8202976` okay?

P.S. Please feel free to reply at any time, also fine after next week, i.e. after the holiday. Happy Lunar New Year.

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

PR Comment: https://git.openjdk.org/riscv-port-jdk11u/pull/3#issuecomment-1932471920


More information about the riscv-port-dev mailing list