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
8256038: G1: Improve comment about mark word handling of displaced mark words #1118
8256038: G1: Improve comment about mark word handling of displaced mark words #1118
Conversation
|
@tschatzl 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 12 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.
|
Thanks @kstefanj @kimbarrett for your reviews. /integrate |
@tschatzl Since your change was applied there have been 12 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit c601849. |
Hi all,
can I have reviews for this small comment change that fixes an imho completely misleading comment into something more understandable. Reasons outlined below:
I.e. in the code:
"in this case ... the obj looks to be forwarded" - it is not true that only in this case the mark word looks to be forwarded because of the copy. G1 always copies the mark word containing the forwarded pointer, i.e. after the copy, the mark word in obj is always the forwarding pointer.
That's why we need to set it to the (eventually updated) old mark word value in all cases....
"we have to install the mark word first" - the order of installing the mark word and updating the displaced mark word is completely irrelevant here - the point is that we need to update the age in the displaced mark word and must not change the old mark word in this branch. The obj->set_mark() call can be at any position actually.
I went with fixing the comment and setting the mark word last in that code block to be similar to other cases. I refrained from other refactorings like refactoring this into (inlined) methods.
Testing: compilation, some quick tests like gcbasher (but errors here typically make building the image fail).
Thanks,
Thomas
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1118/head:pull/1118
$ git checkout pull/1118