Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8253971: ZGC: Flush mark stacks after processing concurrent roots
Reviewed-by: ayang, eosterlund
  • Loading branch information
pliden committed Oct 5, 2020
1 parent 19219a9 commit 65cab55c1b466e8f7d1c9610838cabe786f34b0e
Showing 1 changed file with 8 additions and 0 deletions.
@@ -643,13 +643,15 @@ class ZMarkConcurrentRootsIteratorClosure : public ZRootsIteratorClosure {

class ZMarkConcurrentRootsTask : public ZTask {
private:
ZMark* const _mark;
SuspendibleThreadSetJoiner _sts_joiner;
ZConcurrentRootsIteratorClaimStrong _roots;
ZMarkConcurrentRootsIteratorClosure _cl;

public:
ZMarkConcurrentRootsTask(ZMark* mark) :
ZTask("ZMarkConcurrentRootsTask"),
_mark(mark),
_sts_joiner(),
_roots(),
_cl() {
@@ -662,6 +664,12 @@ class ZMarkConcurrentRootsTask : public ZTask {

virtual void work() {
_roots.oops_do(&_cl);

// Flush and free worker stacks. Needed here since
// the set of workers executing during root scanning
// can be different from the set of workers executing
// during mark.
_mark->flush_and_free();
}
};

0 comments on commit 65cab55

Please sign in to comment.