< prev index next >

src/hotspot/share/gc/z/zMark.cpp

concurrent root iterator

*** 138,147 **** --- 138,165 ---- // during mark. _mark->flush_and_free(); } }; + class ZMarkConcurrentRootsTask : public ZTask { + private: + ZMark* const _mark; + ZConcurrentRootsIterator _roots; + + public: + ZMarkConcurrentRootsTask(ZMark* mark) : + ZTask("ZMarkConcurrentRootsTask"), + _mark(mark), + _roots() {} + + virtual void work() { + ZMarkBarrierOopClosure</* finalizable */ false> cl; + _roots.oops_do(&cl); + } + }; + + void ZMark::start() { // Verification if (ZVerifyMarking) { verify_all_stacks_empty(); } ***************
*** 152,161 **** --- 170,184 ---- // Mark roots ZMarkRootsTask task(this); _workers->run_parallel(&task); } + void ZMark::mark_concurrent_roots() { + ZMarkConcurrentRootsTask task(this); + _workers->run_concurrent(&task); + } + void ZMark::prepare_work() { assert(_nworkers == _workers->nconcurrent(), "Invalid number of workers"); // Set number of active workers _terminate.reset(_nworkers);
< prev index next >