-
Notifications
You must be signed in to change notification settings - Fork 5.9k
8347997: assert(false) failed: EA: missing memory path #23284
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
Conversation
👋 Welcome back kvn! A progress list of the required criteria for merging this PR into |
@vnkozlov 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 63 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 |
Webrevs
|
If you want, the reproducer can be simplified to just invoke pin/unpin, avoids needing the method handle code to invoke them reflectively, e.g.
If you add |
Thank you @AlanBateman for suggestions about the test. I implemented them and verified that the test still catches the failure without fix. |
Good, much simpler. |
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 otherwise.
The only difference in the test is eliminated allocations.
Sounds like a good opportunity for an IR framework test but could be done as follow-up (starter) RFE.
test/hotspot/jtreg/compiler/intrinsics/TestContinuationPinningAndEA.java
Outdated
Show resolved
Hide resolved
|
||
public class TestContinuationPinningAndEA { | ||
|
||
static class FailsEA { |
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.
Should use 4-whitespace indentation since it's Java code.
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.
Otherwise, the fix looks good to me, too!
@@ -3772,6 +3772,18 @@ bool LibraryCallKit::inline_native_Continuation_pinning(bool unpin) { | |||
Node* test_pin_count_over_underflow = _gvn.transform(new BoolNode(pin_count_cmp, BoolTest::eq)); | |||
IfNode* iff_pin_count_over_underflow = create_and_map_if(control(), test_pin_count_over_underflow, PROB_MIN, COUNT_UNKNOWN); | |||
|
|||
// True branch, pin count over/underflow. |
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.
Maybe you can add a comment here about why we do the trap first (as described in the PR description).
…AndEA.java Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
I created JDK-8348887 |
Thank you @TobiHartmann and @chhagedorn for reviews. I addressed your comments. |
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.
Update looks good, thanks!
/integrate |
Thank you, @TobiHartmann and @chhagedorn for reviews |
Going to push as commit 6b581d2.
Your commit was automatically rebased without conflicts. |
C2's Escape Analysis does not recognize pattern where one input of memory
Phi
node isMergeMem
node and an other is RAW store. This pattern is created by Continuation pinning intrinsic. As result EA complains about strange memory graph.I suggest to add second
MergeMem
between Store and Phi nodes by callingreset_memory()
. EA recognize such patter and removes allocations.I checked generated assembler pinning code and it is the same as before. The only difference in the test is eliminated allocations.
I moved Uncommon code up to avoid resetting memory - it is already done at the beginning of this intrinsic code.
We should not use
uncommon_trap_exact()
forDeoptimization::Action_none
- It is used for other actions to prevent changing them toAction_none
.Tested tier1-5, hs-xcomp, hs-comp-stress
Added new regression test based on reproducer from bug report.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23284/head:pull/23284
$ git checkout pull/23284
Update a local copy of the PR:
$ git checkout pull/23284
$ git pull https://git.openjdk.org/jdk.git pull/23284/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23284
View PR using the GUI difftool:
$ git pr show -t 23284
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23284.diff
Using Webrev
Link to Webrev Comment