-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
8297487: G1 Remark: no need to keep alive oop constants of nmethods on stack #11314
8297487: G1 Remark: no need to keep alive oop constants of nmethods on stack #11314
Conversation
👋 Welcome back rrich! A progress list of the required criteria for merging this PR into |
/label hotspot-compiler,hotspot-gc |
/label remove hotspot |
@reinrich The |
@reinrich |
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.
Lgtm. Will push it through our testing.
@reinrich 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 6 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Thanks! |
One other note: since the ARM32 port does not have this nmethod walk safety net during Remark pause anymore and it does not implement nmethod barriers (at least that's what that We at Oracle do not support ARM32 so it should be good, but it may help ARM32 maintainers to keep this now removed code after all. |
Good point. It is myy understanding (also stated in the JBS item) that G1 concurrent marking requires the keep alive of oop constants by the nmethod entry barriers for SATB correctness. So without the entry barriers ARM32 has an issue there already because the keep alive during the remark pause is not sufficient, is it? There's a JBS item JDK-8291302 to implement the nmethod entry barrier assigned to @bulasevich. Boris are there plans to implement the nmethod entry barriers on ARM32 in the near future given that they are required for G1 correctness? |
That is true, but it might make the problem larger than necessary - although admittedly, the comments indicate some magic hand-waving of the effectiveness of this additional walk through the nmethods on thread stacks. Imho G1 has worked well enough with that level of wrongness for a long time on the other platforms, so keeping this (little amount of) code may help ARM32 maintainers to tide over a little bit (i.e. not make their platforms potentially crash left and right) until they are ready with their nmethod barrier implementation. I'm good either way you choose. |
I would like to get rid of the stackwalks if they are unnecessary, for pause time reduction but also to ease understanding the code. I'm not in a hurry though. |
Thanks for the review @albertnetymk |
@reinrich This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
ARM32 issue is solved: 245f0cf |
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.
Thank you Erik. I'll integrate this after another round of tests. |
/integrate |
Going to push as commit eab1e62.
Your commit was automatically rebased without conflicts. |
This pr removes the stackwalks to keep alive oops of nmethods found on stack during G1 remark as it seems redundant. The oops are already kept alive by the nmethod entry barrier
Additionally it fixes a comment that says nmethod entry barriers are needed to deal with continuations which, afaik, is not the case. Please correct me and explain if I'm mistaken.
Testing: the patch is included in our daily CI testing since a week. That is most JCK and JTREG tests, also in Xcomp mode, Renaissance benchmark and SAP specific tests with fastdebug and release builds on the standard platforms plus PPC64. There was no failure I could attribute to this change.
I tried to find a jtreg test that is sensitive to the keep alive by omitting it in the nmethod entry barrier and also in G1 remark but without success.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11314/head:pull/11314
$ git checkout pull/11314
Update a local copy of the PR:
$ git checkout pull/11314
$ git pull https://git.openjdk.org/jdk pull/11314/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11314
View PR using the GUI difftool:
$ git pr show -t 11314
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11314.diff