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

8293474: RISC-V: Unify the way of moving function pointer #10194

Closed
wants to merge 1 commit into from

Conversation

RealFYang
Copy link
Member

@RealFYang RealFYang commented Sep 7, 2022

Currently, there are two different ways of moving function pointer on riscv with either 'li' or 'mv' assembler functions.
For example, in file shenandoahBarrierSetAssembler_riscv.cpp, we use 'li' function:
li(ra, (int64_t)(uintptr_t)ShenandoahRuntime::load_reference_barrier_strong_narrow)

While in file templateInterpreterGenerator_riscv.cpp, we use 'mv' function:
mv(t1, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans))

Use of 'mv' here calls 'movptr' and emits fixed length instruction sequence, which is neither necessary nor optimal compared with use of 'li'. This changes to use 'li' instead of 'movptr' to implement 'mv' and unifies the way of moving function pointer.

Testing: Passed Tier1 test on Linux-riscv64 SiFive Unmatched board.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8293474: RISC-V: Unify the way of moving function pointer

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10194/head:pull/10194
$ git checkout pull/10194

Update a local copy of the PR:
$ git checkout pull/10194
$ git pull https://git.openjdk.org/jdk pull/10194/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10194

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10194.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 7, 2022

👋 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 openjdk bot added the rfr Pull request is ready for review label Sep 7, 2022
@openjdk
Copy link

openjdk bot commented Sep 7, 2022

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

  • hotspot
  • 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 hotspot hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Sep 7, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 7, 2022

Webrevs

Copy link
Contributor

@yadongw yadongw left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@feilongjiang feilongjiang left a comment

Choose a reason for hiding this comment

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

Looks Good. (Not a JDK reviewer)

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 fine.

@openjdk
Copy link

openjdk bot commented Sep 7, 2022

@RealFYang This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8293474: RISC-V: Unify the way of moving function pointer

Reviewed-by: yadongwang, fjiang, shade

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 3 new commits pushed to the master branch:

  • d696104: 4850101: Setting mnemonic to VK_F4 underlines the letter S in a button.
  • 14fd1b6: 8292921: Rewrite object field printer
  • 4f9065d: 8293333: Broken links in JDI specification

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 7, 2022
@RealFYang
Copy link
Member Author

Thanks all for the review. Integrate then.
/integrate

@openjdk
Copy link

openjdk bot commented Sep 8, 2022

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

  • 2d13f53: 8293512: ProblemList serviceability/tmtools/jstat/GcNewTest.java in -Xcomp mode
  • f84386c: 8293182: Improve testing of CDS archive heap
  • 51de765: 8283010: serviceability/sa/ClhsdbThread.java failed with "'Base of Stack:' missing from stdout/stderr "
  • 8a48965: 8293514: ProblemList gc/metaspace/TestMetaspacePerfCounters.java#Epsilon-64 on all platforms
  • 1e031e6: 8293232: Fix race condition in pkcs11 SessionManager
  • 1080c4e: 8293508: ProblemList gc/metaspace/TestMetaspacePerfCounters.java#Epsilon-64
  • aff9a69: 8283224: Remove THREAD_NOT_ALIVE from possible JDWP error codes
  • 76df73b: 8293456: runtime/os/TestTracePageSizes.java sub-tests fail with "AssertionError: No memory range found for address: NNNN"
  • 32c7b62: 8293146: Strict DateTimeFormatter fails to report an invalid week 53
  • 02dce24: 8207166: jdk/jshell/JdiHangingLaunchExecutionControlTest.java - launch timeout
  • ... and 7 more: https://git.openjdk.org/jdk/compare/2259e427a53440da948315db2272396294036051...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 8, 2022

@RealFYang Pushed as commit fc5f97f.

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

@RealFYang RealFYang deleted the JDK-8293474 branch September 8, 2022 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org
4 participants