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