RFR: 8254562: ZGC: Remove ZMarkRootsTask
Per Liden
pliden at openjdk.java.net
Mon Oct 12 12:22:12 UTC 2020
On Mon, 12 Oct 2020 08:39:39 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> 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: void ZRootsIterator::oops_do(ZRootsIteratorClosure* cl) {
>> ZStatTimer timer(ZSubPhasePauseRoots);
>> if (_visit_jvmti_weak_export) {
>> _jvmti_weak_export.oops_do(cl);
>> }
>> }
>
> 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:
> 1) Removes the unnecessary spawning of parallel threads in ZRelocate::start. The JVMTI roots are only visited in a
> single-threaded operation. 2) Removed/replaced ZRootsIterator. Neither ZVerify, nor ZHeapIterator, really used it,
> because they implicitly sent in `false` to the constructor (see above comment). ZRelocate now performs a direct calls,
> which makes it easier to understand, IMHO.
@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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/601
More information about the hotspot-gc-dev
mailing list