Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8276799: Implementation of JEP 422: Linux/RISC-V Port #6294

Closed
wants to merge 5 commits into from

Conversation

RealFYang
Copy link
Member

@RealFYang RealFYang commented Nov 8, 2021

This PR implements JEP 422: Linux/RISC-V Port [1].
The PR starts as a squashed merge of the https://openjdk.java.net/projects/riscv-port branch.

This has been tested with jtreg tier{1,2,3,4} and jcstress on HiFive Unmatched board. Dacapo, SPECjbb2015 and SPECjvm2008 benchmark tests are also carried out regularly. So it should be good enough to run most Java programs.

[1] https://openjdk.java.net/jeps/422


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8276799: Implementation of JEP 422: Linux/RISC-V Port

Reviewers

Contributors

  • Yadong Wang <yadonn.wang@huawei.com>
  • Yanhong Zhu <zhuyanhong2@huawei.com>
  • Feilong Jiang <jiangfeilong@huawei.com>
  • Kun Wang <wangkun49@huawei.com>
  • Zhuxuan Ni <nizhuxuan@huawei.com>
  • Taiping Guo <guotaiping1@huawei.com>
  • Kang He <hekang6@huawei.com>
  • Aleksey Shipilev <shade@openjdk.org>
  • Xiaolin Zheng <yunyao.zxl@alibaba-inc.com>
  • Kuai Wei <kuaiwei.kw@alibaba-inc.com>
  • Magnus Ihse Bursie <ihse@openjdk.org>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6294/head:pull/6294
$ git checkout pull/6294

Update a local copy of the PR:
$ git checkout pull/6294
$ git pull https://git.openjdk.java.net/jdk pull/6294/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6294

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6294.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 8, 2021

👋 Welcome back fyang! 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.

@openjdk
Copy link

openjdk bot commented Nov 8, 2021

@RealFYang The following labels will be automatically applied to this pull request:

  • build
  • core-libs
  • hotspot
  • serviceability
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org build build-dev@openjdk.org hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Nov 8, 2021
@RealFYang
Copy link
Member Author

/contributor add Yadong Wang yadonn.wang@huawei.com
/contributor add Yanhong Zhu zhuyanhong2@huawei.com
/contributor add Feilong Jiang jiangfeilong@huawei.com
/contributor add Kun Wang wangkun49@huawei.com
/contributor add Zhuxuan Ni nizhuxuan@huawei.com
/contributor add Taiping Guo guotaiping1@huawei.com
/contributor add Kang He hekang6@huawei.com
/contributor add shade

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Yadong Wang <yadonn.wang@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Yanhong Zhu <zhuyanhong2@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Feilong Jiang <jiangfeilong@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Kun Wang <wangkun49@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Zhuxuan Ni <nizhuxuan@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Taiping Guo <guotaiping1@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Kang He <hekang6@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2021

@RealFYang
Contributor Aleksey Shipilev <shade@openjdk.org> successfully added.

@RealFYang RealFYang changed the title 8276799: Implementation of JEP XXX: Linux/RISC-V Port 8276799: Implementation of JEP 422: Linux/RISC-V Port Nov 20, 2021
@RealFYang

This comment has been minimized.

@openjdk
Copy link

openjdk bot commented Nov 20, 2021

@RealFYang
Contributor Xiaolin Zheng <yunyao.zxl@alibaba-inc.com> successfully added.

@RealFYang

This comment has been minimized.

@openjdk
Copy link

openjdk bot commented Dec 11, 2021

@RealFYang
Contributor Kuai Wei <kuaiwei.kw@alibaba-inc.com> successfully added.

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 24, 2022

@RealFYang This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 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!

@RealFYang
Copy link
Member Author

Rebased to master

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 21, 2022

@RealFYang This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 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!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 21, 2022
@magicus
Copy link
Member

magicus commented Mar 21, 2022

/reviewers 3 reviewer

@openjdk
Copy link

openjdk bot commented Mar 21, 2022

@magicus Usage: /reviewers <n> [<role>] where <n> is the number of required reviewers. If role is set, the reviewers need to have that project role. If omitted, role defaults to authors.
Number of required reviewers of role reviewers cannot be decreased below 4

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

I've looked at everything that is not a RISC-V specific file, except for the C1 changes as the compiler folk will need to approve those.

Some copyrights will need updating to 2022 on the Oracle copyright line please.

I have flagged one issue in regard to C++ atomics - see below.

Thanks,
David

make/autoconf/libraries.m4 Outdated Show resolved Hide resolved
@RealFYang
Copy link
Member Author

Build changes look good. I can't say anything about the rest of the code.

/reviewers 3

Thanks again for looking at the build changes :-)

@RealFYang
Copy link
Member Author

Hi,

I've looked at everything that is not a RISC-V specific file, except for the C1 changes as the compiler folk will need to approve those.

Some copyrights will need updating to 2022 on the Oracle copyright line please.

Hi David,
I have pushed one more commit updating the Oralce copyright line for existing files touched.
Thanks for looking at this.

Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test/jdk files look ok. (I didn't look at the rest)

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked on C1/C2 changes and compiler tests. Seems reasonable.
But before approval I would need to run changes through our testing.

@RealFYang
Copy link
Member Author

The test/jdk files look ok. (I didn't look at the rest)

Thank you for looking at that part.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update looks good.
Testing results are also good.

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me.

@RealFYang
Copy link
Member Author

@vnkozlov @shipilev : Thanks for reviewing this :-)

@RealFYang
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 24, 2022

Going to push as commit 5905b02.
Since your change was applied there have been 2 commits pushed to the master branch:

  • b05d4cc: 8283350: (tz) Update Timezone Data to 2022a
  • a35afe8: 8283519: Hsdis with capstone should annotate output

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 24, 2022
@openjdk openjdk bot closed this Mar 24, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 24, 2022
@openjdk
Copy link

openjdk bot commented Mar 24, 2022

@RealFYang Pushed as commit 5905b02.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@RealFYang RealFYang deleted the JDK-8276799 branch March 24, 2022 09:32
graalvmbot pushed a commit to oracle/graal that referenced this pull request Apr 10, 2022
libffi offers to APIs for preparing a native call:

https://github.com/libffi/libffi/blob/5dcb741f1544c5e18c9dbf96aeb8b61cc556a616/src/prep_cif.c#L221-L235

The latter (`ffi_prep_cif_var`) is ought to be used for variadic
functions. In practice we only ever used `ffi_prep_cif` as it didn't
matter so far, because the underlying implementation only differs if
`FFI_TARGET_SPECIFIC_VARIADIC` is defined:

https://github.com/libffi/libffi/blob/5dcb741f1544c5e18c9dbf96aeb8b61cc556a616/src/prep_cif.c#L211-L215

And that wasn't relevant until darwin-aarch64:

https://github.com/libffi/libffi/blob/5dcb741f1544c5e18c9dbf96aeb8b61cc556a616/src/aarch64/ffitarget.h#L79

Bonus: It's also needed for linux-riscv:
https://github.com/libffi/libffi/blob/5dcb741f1544c5e18c9dbf96aeb8b61cc556a616/src/riscv/ffitarget.h#L66

OpenJDK support has landed recently, so we might care about
linux-riscv "soon" ;-)
openjdk/jdk#6294

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

The infrastructure to use `ffi_prep_cif_var` is actually there, but
since we didn't include the ellipsis in the signature it didn't propgate
down through the SignatureBuilder.
instruct cmpU_loop(cmpOpU cmp, iRegI op1, iRegI op2, label lbl)
%{
// Same match rule as `far_cmpU_loop'.
match(CountedLoopEnd cmp (CmpU op1 op2));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which testcases can test this instruct and the following instructs?
match(CountedLoopEnd cmp (CmpP op1 op2));
match(CountedLoopEnd cmp (CmpN op1 op2));
match(CountedLoopEnd cmp (CmpF op1 op2));
match(CountedLoopEnd cmp (CmpD op1 op2));

I suspect this instruction is useless.

@openjdk
Copy link

openjdk bot commented Feb 17, 2023

@magicus The command reviewers can only be used in open pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

7 participants