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
8285820: C2: LCM prioritizes locally dependent CreateEx nodes over projections after 8270090 #8568
Conversation
|
@robcasloz 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. |
Thanks for testing, Aleksey! |
/contributor add @shipilev |
@robcasloz |
@robcasloz This change now passes all automated pre-integration checks. 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 103 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.
|
Thanks for reviewing, Tobias! |
Thanks for the review, Vladimir! |
/integrate |
Going to push as commit 89392fb.
Your commit was automatically rebased without conflicts. |
@robcasloz Pushed as commit 89392fb. |
Here is the RFE: https://bugs.openjdk.java.net/browse/JDK-8286622. |
This changeset lowers the priority of locally-dependent CreateEx nodes, that is CreateEx nodes that are not initially ready for scheduling in LCM. The proposed scheme assigns them the same priority as projection nodes when selecting the next node to be scheduled, restoring the relative prioritization between projections and CreateEx nodes to the state it was before JDK-8270090. JDK-8270090 wrongly gave all CreateEx nodes the highest priority, which leads to failures whenever projection nodes are expected to get higher priority than locally-dependent CreateEx nodes. See the JBS issue report for further detail.
More specifically, the current ranking to select the next node to be scheduled in
PhaseCFG::select()
is:After this changeset, the ranking becomes:
which still addresses the issue handled by JDK-8270090 but in a form that is closer to the original ranking before JDK-8270090:
This changeset implements the minimal changes to restore the relative prioritization between CreateEx nodes and projections to the state it was before JDK-8270090, for risk minimization and ease of backporting. I will file a separate RFE proposing a more robust alternative than altering the order of the LCM worklist for ensuring that initially ready CreateEx nodes are scheduled at the block start.
Testing
Functionality
-XX:+UseShenandoahGC
(thanks to Aleksey Shipilev for testing).Performance
Tested performance on a set of standard benchmark suites (DaCapo, SPECjbb2015, SPECjvm2008, ...) and on linux-x64, linux-aarch64, windows-x64, and macosx-x64. No significant regression was observed.
Progress
Issue
Reviewers
Contributors
<shade@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8568/head:pull/8568
$ git checkout pull/8568
Update a local copy of the PR:
$ git checkout pull/8568
$ git pull https://git.openjdk.java.net/jdk pull/8568/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 8568
View PR using the GUI difftool:
$ git pr show -t 8568
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8568.diff