67 volatile bool _claimed; 68 69 public: 70 ZSerialWeakOopsDo(T* iter); 71 void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); 72 }; 73 74 template <typename T, void (T::*F)(BoolObjectClosure*, ZRootsIteratorClosure*)> 75 class ZParallelWeakOopsDo { 76 private: 77 T* const _iter; 78 volatile bool _completed; 79 80 public: 81 ZParallelWeakOopsDo(T* iter); 82 void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); 83 }; 84 85 class ZRootsIterator { 86 private: 87 bool _visit_jvmti_weak_export; 88 89 void do_universe(ZRootsIteratorClosure* cl); 90 void do_object_synchronizer(ZRootsIteratorClosure* cl); 91 void do_management(ZRootsIteratorClosure* cl); 92 void do_jvmti_export(ZRootsIteratorClosure* cl); 93 void do_jvmti_weak_export(ZRootsIteratorClosure* cl); 94 void do_system_dictionary(ZRootsIteratorClosure* cl); 95 void do_threads(ZRootsIteratorClosure* cl); 96 void do_code_cache(ZRootsIteratorClosure* cl); 97 98 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_universe> _universe; 99 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_object_synchronizer> _object_synchronizer; 100 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_management> _management; 101 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_export> _jvmti_export; 102 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_weak_export> _jvmti_weak_export; 103 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_system_dictionary> _system_dictionary; 104 ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_threads> _threads; 105 ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_code_cache> _code_cache; 106 107 public: 108 ZRootsIterator(bool visit_jvmti_weak_export = false); 109 ~ZRootsIterator(); 110 111 void oops_do(ZRootsIteratorClosure* cl); 112 }; 113 114 class ZConcurrentRootsIterator { 115 private: 116 ZOopStorageIterator _jni_handles_iter; 117 ZOopStorageIterator _vm_handles_iter; 118 const int _cld_claim; 119 120 void do_jni_handles(ZRootsIteratorClosure* cl); 121 void do_vm_handles(ZRootsIteratorClosure* cl); 122 void do_class_loader_data_graph(ZRootsIteratorClosure* cl); 123 124 ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_jni_handles> _jni_handles; 125 ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_vm_handles> _vm_handles; 126 ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_class_loader_data_graph> _class_loader_data_graph; 127 128 public: | 67 volatile bool _claimed; 68 69 public: 70 ZSerialWeakOopsDo(T* iter); 71 void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); 72 }; 73 74 template <typename T, void (T::*F)(BoolObjectClosure*, ZRootsIteratorClosure*)> 75 class ZParallelWeakOopsDo { 76 private: 77 T* const _iter; 78 volatile bool _completed; 79 80 public: 81 ZParallelWeakOopsDo(T* iter); 82 void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl); 83 }; 84 85 class ZRootsIterator { 86 private: 87 const bool _visit_jvmti_weak_export; 88 const bool _disarm_nmethods; 89 90 void do_universe(ZRootsIteratorClosure* cl); 91 void do_object_synchronizer(ZRootsIteratorClosure* cl); 92 void do_management(ZRootsIteratorClosure* cl); 93 void do_jvmti_export(ZRootsIteratorClosure* cl); 94 void do_jvmti_weak_export(ZRootsIteratorClosure* cl); 95 void do_system_dictionary(ZRootsIteratorClosure* cl); 96 void do_threads(ZRootsIteratorClosure* cl); 97 void do_code_cache(ZRootsIteratorClosure* cl); 98 99 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_universe> _universe; 100 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_object_synchronizer> _object_synchronizer; 101 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_management> _management; 102 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_export> _jvmti_export; 103 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_weak_export> _jvmti_weak_export; 104 ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_system_dictionary> _system_dictionary; 105 ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_threads> _threads; 106 ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_code_cache> _code_cache; 107 108 public: 109 ZRootsIterator(bool visit_jvmti_weak_export = false, bool disarm_nmethod = false); 110 ~ZRootsIterator(); 111 112 void oops_do(ZRootsIteratorClosure* cl); 113 }; 114 115 class ZConcurrentRootsIterator { 116 private: 117 ZOopStorageIterator _jni_handles_iter; 118 ZOopStorageIterator _vm_handles_iter; 119 const int _cld_claim; 120 121 void do_jni_handles(ZRootsIteratorClosure* cl); 122 void do_vm_handles(ZRootsIteratorClosure* cl); 123 void do_class_loader_data_graph(ZRootsIteratorClosure* cl); 124 125 ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_jni_handles> _jni_handles; 126 ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_vm_handles> _vm_handles; 127 ZParallelOopsDo<ZConcurrentRootsIterator, &ZConcurrentRootsIterator::do_class_loader_data_graph> _class_loader_data_graph; 128 129 public: |