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
JDK-8269651: ZGC: Optimize away gc locker in mark start #4638
Conversation
|
@Hamlin-Li 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. |
Sorry, but we can't do this. The GC locker needs to be honored any time the good/bad mask is changed, so both MarkStart and RelocateStart still needs it.
Thanks for clarification. But after further investigation, it seems to me that for GetXxxCritical it's OK to remove gc locker at MarkStart.
Please kindly correct my comments above. |
We currently have the invariant that all accesses must go through the currently good heap view. While you can "cheat" and access objects through a bad heap view that will only work as long as you don't enable -XX:+ZVerifyViews, which will enforce this invariant. ZVerifyViews unmaps memory that isn't currently in the good heap view. It's a valuable debugging option to catch bad accesses, like when a load barrier is missing. ZVerifyViews is disabled by default because it's expensive. |
I see, Thanks for clarification! |
Currently, ZGC involves gc locker in mark-start and relocate-start.
It seems gc locker in mark-start is not necessary anymore.
This is to remove this unnecessary(??) gc locker before further optimization is discussed.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4638/head:pull/4638
$ git checkout pull/4638
Update a local copy of the PR:
$ git checkout pull/4638
$ git pull https://git.openjdk.java.net/jdk pull/4638/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4638
View PR using the GUI difftool:
$ git pr show -t 4638
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4638.diff