-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8335334: Stress mode to randomly execute unstable if traps #21037
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 thartmann! A progress list of the required criteria for merging this PR into |
@TobiHartmann 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 100 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 |
@TobiHartmann 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
|
@@ -719,6 +719,11 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci, | |||
method()->ensure_method_data(); | |||
} | |||
|
|||
if (StressLCM || StressGCM || StressIGVN || StressCCP || |
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 need to initialize the seed earlier because StressUnstableIfTraps
is already used during parsing.
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.
Few 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.
Thanks for your review, Vladimir! I uploaded a new version and 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.
More 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.
Thanks again Vladimir. I updated the code and answered 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.
Looks good now.
Thank you for looking on this. I am fine with current code. |
Thanks Vladimir! |
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.
Small suggestion, otherwise, it looks good to me, too!
} | ||
} | ||
|
||
void Parse::stress_trap(IfNode* orig_iff, Node* counter, Node* incr_store) { |
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.
Can you add a brief summary as method comment (i.e. following the explanation in the PR)? This would help to understand the reason why we want to stress traps, how it looks in the IR, and how frequently the trap is taken.
Thanks for the review Christian! I added a comment to |
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 adding the comment! Great to have this new stress mode :-)
Thanks Christian! |
/integrate |
Going to push as commit 63e611c.
Your commit was automatically rebased without conflicts. |
@TobiHartmann Pushed as commit 63e611c. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Unstable if traps are supposed to be taken rarely. This patch introduces a
StressUnstableIfTraps
flag that forces unstable if traps to be taken randomly and thus potentially triggering intermittent bugs such as incorrect debug information. It works by adding another if before the unstable if that checks a "random" condition at runtime (a simple shared counter) and then either takes the trap or executes the original, unstable if.This stress option also has the nice side effect of triggering re-compilation of methods that would otherwise not be re-compiled (see JDK-8335843).
I had to adjust a few tests that rely on methods being compiled / deoptimized because with the stress option enabled, deoptimization might unexpectedly (not) happen.
It reliably triggers JDK-8335977, JDK-8320308 and JDK-8335843 in our testing.
Tested with multiple runs up to tier6. I'll integrate it into our (Oracle internal) testing and CTW (JDK-8340302) once all the bugs that it currently triggers are fixed.
Thanks,
Tobias
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21037/head:pull/21037
$ git checkout pull/21037
Update a local copy of the PR:
$ git checkout pull/21037
$ git pull https://git.openjdk.org/jdk.git pull/21037/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21037
View PR using the GUI difftool:
$ git pr show -t 21037
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21037.diff
Webrev
Link to Webrev Comment