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
8254562: ZGC: Remove ZMarkRootsTask #601
Conversation
|
Webrevs
|
Looking at this some more I figured that we could clean up the rest of the ZRootIterator usages. The JVMTI cleaning isn't really a root, but rather a way for us to update the JVMTI datastructure after the objects have moved (update their identities). So, the last patch:
|
@stefank I see we're poking around in the same code :) I agree about the ZMarkTask/ZVerify/ZHeapIterator changes, but I don't think your change to ZRelocate will actually work, because without a ZTask the VM thread will not have a worker id, which will make the allocation path sad. To avoid stalling this patch, would you mind not doing the ZRelocate changes here, and we can continue discussning how we want to do this. |
I agree with Per that we can start by removing the marking stuff first. I think Coleen is just about to move the JVMTI tag map oops into OopStorage, and then we can nuke the relocation code too.
Talked to Per. The plan is to revert the removal of the ZRelocateRootsTask, but at least run that code with only one worker thread. Running tests now. |
// During relocation we need to visit the JVMTI | ||
// export weak roots to rehash the JVMTI tag map | ||
_roots.oops_do(&_cl); | ||
ZRelocateRoots::oops_do(&_cl); |
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.
I would have been more explicit here, something like this:
class ZRelocateJVMTIWeakExportTask : public ZTask {
public:
ZRelocateJVMTIWeakExportTask() :
ZTask("ZRelocateJVMTIWeakExportTask") {}
virtual void work() {
AlwaysTrueClosure always_alive;
ZRelocateRootsIteratorClosure _cl;
JvmtiExport::weak_oops_do(&always_alive, &cl);
}
};
void ZRelocate::start() {
// During relocation we need to visit the JVMTI
// export weak roots to rehash the JVMTI tag map
ZStatTimer timer(ZSubPhasePauseRelocateJVMTIWeakExport);
ZRelocateJVMTIWeakExportTask task;
_workers->run_serial(&task);
}
But this code will go away soon anyway, so you decide.
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.
I agree, and I actually started that way, but hit some minor snags that ZSubPhasePauseRelocateJVMTIWeakExport wasn't available to zRelocate.cpp, and I wasn't sure about moving a PhasePause instance out from the zRootsIterator.cpp.
@stefank 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 14 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.
|
I'm going to push the patch as is. The relocate part will change soon anyway. /integrate |
@stefank Since your change was applied there have been 22 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 9d230ea. |
After introducing concurrent stack scanning, we don't need to mark through any roots during the mark start pause. Remove the code.
Note that the old code passed in
false
to_roots(false /* visit_jvmti_weak_export */)
. This has the effect that no roots are visited by the iterator:Progress
Testing
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/601/head:pull/601
$ git checkout pull/601