-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8264783: G1 BOT verification should not verify beyond allocation threshold #3356
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 tschatzl! A progress list of the required criteria for merging this PR into |
The change looks good to me. |
@tschatzl 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 66 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 |
Thanks @Hamlin-Li @albertnetymk for your revies. |
/integrate |
@tschatzl Since your change was applied there have been 67 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit e604320. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The G1 BOT contains an allocation threshold which basically acts as a "last known valid entry" index for the per-region BOT (which are views on the global BOT table).
Currently G1 BOT verification actually "verifies" the BOT within a region past that BOT index.
This causes issues with young regions; actually there is already code that prevents their BOT verification. This is perfectly fine, allocations in young regions do not update the BOTs.
With JDK-8262068/PR #2760 this existing filtering of young regions (such that their BOT is not verified) does not work because there may be young regions that are not compacted (so with a BOT that have that last known valid entry at the start of the region) are still labelled as old.
This change proposes to not try to verify the BOT beyond the last known valid index (which is arguably not worth doing), which also covers the existing young filtering.
There are alternatives that may work in particular for JDK-8262068:
a) always compact young regions (which recreates the BOT)
b) create a "dummy" BOT that spans the entire part of the region containing live objects
However they were rejected by me because
option a) takes time and directly counters that optimization for no reason
option b) makes finding the start of an object within these regions slow (they are not refined when there is at least some bot)
and finally I do not think there is much point in trying to be clever about areas in the BOT that are known to not contain useful values.
Testing: tier1-3
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3356/head:pull/3356
$ git checkout pull/3356
Update a local copy of the PR:
$ git checkout pull/3356
$ git pull https://git.openjdk.java.net/jdk pull/3356/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3356
View PR using the GUI difftool:
$ git pr show -t 3356
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3356.diff