-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8293770: RISC-V: Reuse runtime call trampolines #10260
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
8293770: RISC-V: Reuse runtime call trampolines #10260
Conversation
|
👋 Welcome back dzhang! A progress list of the required criteria for merging this PR into |
|
/contributor add zifeihan caogui@iscas.ac.cn |
|
@DingliZhang Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
|
@DingliZhang The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
|
/contributor add zifeihan caogui@iscas.ac.cn |
|
@DingliZhang |
RealFYang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two comments here.
| if (_shared_trampoline_requests == nullptr) { | ||
| constexpr unsigned init_size = 8; | ||
| constexpr unsigned max_size = 256; | ||
| _shared_trampoline_requests = new SharedTrampolineRequests(init_size, max_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same concern here as [1]. Did you looked into it?
[1] #9405 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run the benchmark in Renaissance (0.14.1), the default number of compiler threads is 15 (related to the number of CPUs) and I have not found this problem so far.
| entry.rspec().type() == relocInfo::static_call_type || | ||
| entry.rspec().type() == relocInfo::virtual_call_type, "wrong reloc type"); | ||
|
|
||
| address target = entry.target(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We call far_branches() and entry.target() more than once here in this function, which could be simplified.
I think we can set target according to result of far_branches() and plant a single jal(target) instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We call far_branches() and entry.target() more than once here in this function, which could be simplified. I think we can set target according to result of far_branches() and plant a single jal(target) instead.
Done. Thanks for reviewing!
|
@DingliZhang 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: 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 51 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@RealFYang, @shipilev) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright of codeBuffer_riscv.hpp should be update to 2022.
Hi @RealFYang Thank you for the comments! |
Co-authored-by: zifeihan <caogui@iscas.ac.cn>
0f46ec3 to
de0fbed
Compare
|
@DingliZhang Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information. |
Hi @feilongjiang Thank you for the comments! |
RealFYang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated change looks good.
Since this changes a shared test, better to have another review.
Maybe @shipilev ?
shipilev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test change is pretty trivial, TBH. I have not looked into RISC-V parts.
|
@feilongjiang @RealFYang @shipilev Thanks for the review. |
|
@DingliZhang |
|
/sponsor |
|
Going to push as commit 7c60e6d.
Your commit was automatically rebased without conflicts. |
|
@RealFYang @DingliZhang Pushed as commit 7c60e6d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Follow up JDK-8280152, this case also exists in riscv.
Benchmark als, chi-square, dec-tree, log-regression, naive-bayes, page-rank, fj-kmeans, reactors, future-genetic, mnemonics, dotty, scala-kmeans, and finagle-http in Renaissance (0.14.1) are tested. The sum of the used size of CodeHeap 'non-profiled nmethods' and CodeHeap 'profiled nmethods' shows ~2.1% reduction on average.
Testing:
Results
Results from Renaissance 0.14.1
Progress
Issue
Reviewers
Contributors
<caogui@iscas.ac.cn>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10260/head:pull/10260$ git checkout pull/10260Update a local copy of the PR:
$ git checkout pull/10260$ git pull https://git.openjdk.org/jdk pull/10260/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10260View PR using the GUI difftool:
$ git pr show -t 10260Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10260.diff