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
8271217: Fix race between G1PeriodicGCTask checks and GC request #4905
Conversation
|
@kimbarrett 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
|
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!
@kimbarrett 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 no new commits pushed to the
|
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.
If you like, you could initialize the values of the counters in the default constructor (to zero for example).
I think initialized to zero is no better than uninitialized here. Either |
/integrate |
Going to push as commit 452f7d7. |
@kimbarrett Pushed as commit 452f7d7. |
Please review this change to remove a race involving G1PeriodicGCTask. The
task performs various checks to determine whether a periodic GC should be
performed. If they pass, then it requests the GC by calling try_collect.
The problem is that an unrelated GC could occur after the task's checks but
before its request is processed. In that case we don't want to do the
periodic GC after all, but there's nothing to prevent it.
This change lets the task capture the various GC counters as part of its
checking, and pass them to try_collect for use in detecting an intervening
GC.
Testing:
mach5 tier1
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4905/head:pull/4905
$ git checkout pull/4905
Update a local copy of the PR:
$ git checkout pull/4905
$ git pull https://git.openjdk.java.net/jdk pull/4905/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4905
View PR using the GUI difftool:
$ git pr show -t 4905
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4905.diff