-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8334629: [BACKOUT] PhaseIdealLoop::conditional_move is too conservative #19650
Conversation
👋 Welcome back qamai! A progress list of the required criteria for merging this PR into |
@merykitty 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 140 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. ➡️ To integrate this PR with the above commit message to the |
@merykitty 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. |
Webrevs
|
Can you verify if the regression is solved with this patch. Also, I decided to not include your benchmark. The reason is that it is actually similar to that added by JDK-8319451. For such a small array, I believe the branch predictor can remember the whole sequence, which results in perfect prediction all the time, explaining the results. I recall that when making that benchmark, my CPU could remember an array of 1000 elements, which led to me using a huge array of 1 million. Thank you very much. |
Thanks, Quan Anh. On second thought, I think it's best to cleanly backout JDK-8319451 for now and file a REDO to get rid of the dependency on |
This reverts commit ac968c3.
@merykitty Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
@TobiHartmann Thanks for your suggestion, I have changed this to a backout, I need to also rename the issue, right? |
@TobiHartmann @merykitty |
@eme64 Thanks for the info, what if we only want to backout the change without the intention of doing a REDO? |
The OpenJDK Guide has all the details, see "Alternative 3": I think creating a REDO is fine though, since we definitely want to get rid of the dependency on |
@TobiHartmann Thanks for your suggestion, I have made relevant issues and changed the title of this PR, can you please review it? |
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.
Looks good, it is the exact backout of https://github.com/openjdk/jdk/pull/16524/files.
I guess it is a shame that you are also backing out the microbenchmark, but you can easily push that separately or in your REDO.
Aha, I just saw that there are apparently failures on GitHub actions:
Could these be related? |
It is possible that the test that @jaskarth added in the meantime relied on your change: https://github.com/openjdk/jdk/blame/master/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java |
I'll run testing from our side, please ask for the results before you integrate. |
Ah yep, looking at the log the main IfNode has |
@jaskarth Thanks for your analysis, I added the test to the problem list and created a relevant issue for it. |
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.
Looks good to me too.
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.
Thanks for creating the issue! I've assigned myself to it. The patch looks good to me as well.
@merykitty testing looks good (only failed for |
@eme64 @TobiHartmann @jaskarth Thanks a lot for your reviews. |
Going to push as commit 933eaba.
Your commit was automatically rebased without conflicts. |
@merykitty Pushed as commit 933eaba. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
/backport jdk:jdk23 |
@TobiHartmann the backport was successfully created on the branch backport-TobiHartmann-933eabab-jdk23 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk23, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:
|
Hi,
I cannot explain the regression, comparing the current mainline to JDK-21 reveals a decrease in performance, yet it is only for some combinations of OS-GC and perfasm shows that the hot regions (>99% of execution time) do not contain differences that can explain the results.
Consequently, with the advice of @TobiHartmann , I propose to effectively revert JDK-8319451 for the generation of
CMove
s inside loops. For those outside, the before-JDK-8319451 probability threshold is 0.001 and the current value is 0.01. I think the current value is more reasonable as evidenced by the benchmark added in JDK-8319451.Please kindly review, thank you very much.
Quan Anh
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19650/head:pull/19650
$ git checkout pull/19650
Update a local copy of the PR:
$ git checkout pull/19650
$ git pull https://git.openjdk.org/jdk.git pull/19650/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19650
View PR using the GUI difftool:
$ git pr show -t 19650
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19650.diff
Webrev
Link to Webrev Comment