jdk8u-dev icon indicating copy to clipboard operation
jdk8u-dev copied to clipboard

8199138: Add RISC-V support to Zero

Open DingliZhang opened this issue 1 year ago • 22 comments
trafficstars

Hi all,

I'd like to backport this patch to jdk8u. Since most linux distributions support riscv64 and provide zero version jdk8 for riscv64. However, we may need to do some workarounds each time we upgrade the version, so I think it is helpful to provide zero support for riscv64 here.

common/autoconf/build-aux/config.guess and hotspot/src/os/linux/vm/os_linux.cpp do not apply cleanly due to context difference, but it is easy to resolve them manually. common/autoconf/platform.m4 just changed file path and remove test of x$OPENJDK_$1_CPU.

common/autoconf/generated-configure.sh regenerated by bash common/autoconf/autogen.sh. I used autoconf-2.69 and build from the source . But it looks a bit different from the one generated in the repo. I also tried autoconf-2.69 that comes with ubuntu 20.04 and the generated file is similar to the one in https://github.com/openjdk/jdk8u-dev/pull/413. I'm not quite sure which version of autoconf2.69 to use, if anyone has a better suggestion or is willing to help me generate a different one, I'd appreciate it!

Both cross-compile build and native build on riscv64 hardware is tested.

cross-compile on x86

boot jdk

openjdk version "1.8.0_43"
OpenJDK Runtime Environment (build 1.8.0_43-b03)
OpenJDK 64-Bit Server VM (build 25.40-b25, mixed mode)

run on qemu

openjdk version "1.8.0_432-internal"
OpenJDK Runtime Environment (build 1.8.0_432-internal-zhangdingli_2024_09_02_21_37-b00)
OpenJDK 64-Bit Zero VM (build 25.432-b00, interpreted mode)

native build on lp4a

boot jdk

openjdk version "1.8.0_412"
OpenJDK Runtime Environment Bisheng (build 1.8.0_412-b08)
OpenJDK 64-Bit Zero VM Bisheng (build 25.412-b08, interpreted mode)

run on lp4a

openjdk version "1.8.0_432-internal"
OpenJDK Runtime Environment (build 1.8.0_432-internal-openeuler_2024_09_02_21_38-b00)
OpenJDK 64-Bit Zero VM (build 25.432-b00, interpreted mode)

Thanks, Dingli


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] JDK-8199138 needs maintainer approval

Issue

  • JDK-8199138: Add RISC-V support to Zero (Bug - P4 - Requested)

Reviewers

Contributors

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/573/head:pull/573
$ git checkout pull/573

Update a local copy of the PR:
$ git checkout pull/573
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/573/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 573

View PR using the GUI difftool:
$ git pr show -t 573

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/573.diff

Using Webrev

Link to Webrev Comment

DingliZhang avatar Sep 03 '24 04:09 DingliZhang

:wave: Welcome back dzhang! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Sep 03 '24 04:09 bridgekeeper[bot]

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar Sep 03 '24 04:09 openjdk[bot]

This backport pull request has now been updated with issue from the original commit.

openjdk[bot] avatar Sep 03 '24 04:09 openjdk[bot]

Webrevs

mlbridge[bot] avatar Sep 03 '24 04:09 mlbridge[bot]

Thanks to Gui Cao for the original patch. /contributor add gcao

DingliZhang avatar Sep 03 '24 05:09 DingliZhang

@DingliZhang Contributor Gui Cao <[email protected]> successfully added.

openjdk[bot] avatar Sep 03 '24 05:09 openjdk[bot]

/approval request allow Zero build on RISC-V

DingliZhang avatar Sep 03 '24 06:09 DingliZhang

@DingliZhang 8199138: The approval request has been created successfully.

openjdk[bot] avatar Sep 03 '24 06:09 openjdk[bot]

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Oct 01 '24 12:10 bridgekeeper[bot]

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Keep this open. I'll review after the upcoming release on the 15th.

gnu-andrew avatar Oct 02 '24 16:10 gnu-andrew

Thanks for the update. I am not sure about the autoconf issue here. You need to ask for the maintainer's comments/suggestions (@gnu-andrew once mentioned the possibility of backporting https://bugs.openjdk.org/browse/JDK-8195689 on #413) to remove the generated configure at the start of the next release cycle). The rest of the change looks good to me (Not a 8u Reviewer).

Yes, the in-tree auto-generated configure is a recurring problem. I certainly would like to backport the other fix. I'll have a look when I review this as to whether we should wait on that here or just commit this as is.

gnu-andrew avatar Oct 02 '24 16:10 gnu-andrew

Thanks for the update. I am not sure about the autoconf issue here. You need to ask for the maintainer's comments/suggestions (@gnu-andrew once mentioned the possibility of backporting https://bugs.openjdk.org/browse/JDK-8195689 on #413) to remove the generated configure at the start of the next release cycle). The rest of the change looks good to me (Not a 8u Reviewer).

Yes, the in-tree auto-generated configure is a recurring problem. I certainly would like to backport the other fix. I'll have a look when I review this as to whether we should wait on that here or just commit this as is.

Thanks for the reply, I'm looking forward to it.

DingliZhang avatar Oct 12 '24 02:10 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Nov 09 '24 04:11 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Nov 13 '24 00:11 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Dec 11 '24 01:12 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Dec 12 '24 03:12 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jan 09 '25 05:01 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Jan 09 '25 06:01 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Feb 06 '25 10:02 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Feb 17 '25 03:02 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Mar 17 '25 08:03 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Mar 24 '25 03:03 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Apr 21 '25 09:04 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Apr 28 '25 00:04 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar May 26 '25 02:05 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar May 26 '25 03:05 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jun 23 '25 07:06 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Jul 01 '25 12:07 DingliZhang

@DingliZhang This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Jul 29 '25 20:07 bridgekeeper[bot]

bot, please keep it open

DingliZhang avatar Jul 30 '25 07:07 DingliZhang