equal
deleted
inserted
replaced
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 #include "precompiled.hpp" |
24 #include "precompiled.hpp" |
|
25 #include "classfile/classLoaderDataGraph.hpp" |
25 #include "gc/z/zBarrier.inline.hpp" |
26 #include "gc/z/zBarrier.inline.hpp" |
26 #include "gc/z/zMark.inline.hpp" |
27 #include "gc/z/zMark.inline.hpp" |
27 #include "gc/z/zMarkCache.inline.hpp" |
28 #include "gc/z/zMarkCache.inline.hpp" |
28 #include "gc/z/zMarkStack.inline.hpp" |
29 #include "gc/z/zMarkStack.inline.hpp" |
29 #include "gc/z/zMarkTerminate.inline.hpp" |
30 #include "gc/z/zMarkTerminate.inline.hpp" |
630 }; |
631 }; |
631 |
632 |
632 |
633 |
633 class ZMarkConcurrentRootsTask : public ZTask { |
634 class ZMarkConcurrentRootsTask : public ZTask { |
634 private: |
635 private: |
|
636 SuspendibleThreadSetJoiner _sts_joiner; |
635 ZConcurrentRootsIterator _roots; |
637 ZConcurrentRootsIterator _roots; |
636 ZMarkConcurrentRootsIteratorClosure _cl; |
638 ZMarkConcurrentRootsIteratorClosure _cl; |
637 |
639 |
638 public: |
640 public: |
639 ZMarkConcurrentRootsTask(ZMark* mark) : |
641 ZMarkConcurrentRootsTask(ZMark* mark) : |
640 ZTask("ZMarkConcurrentRootsTask"), |
642 ZTask("ZMarkConcurrentRootsTask"), |
641 _roots(true /* marking */), |
643 _sts_joiner(true /* active */), |
642 _cl() {} |
644 _roots(ClassLoaderData::_claim_strong), |
|
645 _cl() { |
|
646 ClassLoaderDataGraph_lock->lock(); |
|
647 ClassLoaderDataGraph::clear_claimed_marks(); |
|
648 } |
|
649 |
|
650 ~ZMarkConcurrentRootsTask() { |
|
651 ClassLoaderDataGraph_lock->unlock(); |
|
652 } |
643 |
653 |
644 virtual void work() { |
654 virtual void work() { |
645 _roots.oops_do(&_cl); |
655 _roots.oops_do(&_cl); |
646 } |
656 } |
647 }; |
657 }; |