equal
deleted
inserted
replaced
67 |
67 |
68 static const ZStatSubPhase ZSubPhaseConcurrentRootsSetup("Concurrent Roots Setup"); |
68 static const ZStatSubPhase ZSubPhaseConcurrentRootsSetup("Concurrent Roots Setup"); |
69 static const ZStatSubPhase ZSubPhaseConcurrentRoots("Concurrent Roots"); |
69 static const ZStatSubPhase ZSubPhaseConcurrentRoots("Concurrent Roots"); |
70 static const ZStatSubPhase ZSubPhaseConcurrentRootsTeardown("Concurrent Roots Teardown"); |
70 static const ZStatSubPhase ZSubPhaseConcurrentRootsTeardown("Concurrent Roots Teardown"); |
71 static const ZStatSubPhase ZSubPhaseConcurrentRootsJNIHandles("Concurrent Roots JNIHandles"); |
71 static const ZStatSubPhase ZSubPhaseConcurrentRootsJNIHandles("Concurrent Roots JNIHandles"); |
|
72 static const ZStatSubPhase ZSubPhaseConcurrentRootsVMHandles("Concurrent Roots VMHandles"); |
72 static const ZStatSubPhase ZSubPhaseConcurrentRootsClassLoaderDataGraph("Concurrent Roots ClassLoaderDataGraph"); |
73 static const ZStatSubPhase ZSubPhaseConcurrentRootsClassLoaderDataGraph("Concurrent Roots ClassLoaderDataGraph"); |
73 |
74 |
74 static const ZStatSubPhase ZSubPhasePauseWeakRootsSetup("Pause Weak Roots Setup"); |
75 static const ZStatSubPhase ZSubPhasePauseWeakRootsSetup("Pause Weak Roots Setup"); |
75 static const ZStatSubPhase ZSubPhasePauseWeakRoots("Pause Weak Roots"); |
76 static const ZStatSubPhase ZSubPhasePauseWeakRoots("Pause Weak Roots"); |
76 static const ZStatSubPhase ZSubPhasePauseWeakRootsTeardown("Pause Weak Roots Teardown"); |
77 static const ZStatSubPhase ZSubPhasePauseWeakRootsTeardown("Pause Weak Roots Teardown"); |
229 JvmtiExport::weak_oops_do(&always_alive, cl); |
230 JvmtiExport::weak_oops_do(&always_alive, cl); |
230 } |
231 } |
231 |
232 |
232 void ZRootsIterator::do_system_dictionary(ZRootsIteratorClosure* cl) { |
233 void ZRootsIterator::do_system_dictionary(ZRootsIteratorClosure* cl) { |
233 ZStatTimer timer(ZSubPhasePauseRootsSystemDictionary); |
234 ZStatTimer timer(ZSubPhasePauseRootsSystemDictionary); |
234 SystemDictionary::oops_do(cl); |
235 // Handles are processed via _vm_handles. |
|
236 SystemDictionary::oops_do(cl, false /* include_handles */); |
235 } |
237 } |
236 |
238 |
237 void ZRootsIterator::do_threads(ZRootsIteratorClosure* cl) { |
239 void ZRootsIterator::do_threads(ZRootsIteratorClosure* cl) { |
238 ZStatTimer timer(ZSubPhasePauseRootsThreads); |
240 ZStatTimer timer(ZSubPhasePauseRootsThreads); |
239 ResourceMark rm; |
241 ResourceMark rm; |
262 } |
264 } |
263 } |
265 } |
264 |
266 |
265 ZConcurrentRootsIterator::ZConcurrentRootsIterator(int cld_claim) : |
267 ZConcurrentRootsIterator::ZConcurrentRootsIterator(int cld_claim) : |
266 _jni_handles_iter(JNIHandles::global_handles()), |
268 _jni_handles_iter(JNIHandles::global_handles()), |
|
269 _vm_handles_iter(SystemDictionary::vm_global_oop_storage()), |
267 _cld_claim(cld_claim), |
270 _cld_claim(cld_claim), |
268 _jni_handles(this), |
271 _jni_handles(this), |
|
272 _vm_handles(this), |
269 _class_loader_data_graph(this) { |
273 _class_loader_data_graph(this) { |
270 ZStatTimer timer(ZSubPhaseConcurrentRootsSetup); |
274 ZStatTimer timer(ZSubPhaseConcurrentRootsSetup); |
271 } |
275 } |
272 |
276 |
273 ZConcurrentRootsIterator::~ZConcurrentRootsIterator() { |
277 ZConcurrentRootsIterator::~ZConcurrentRootsIterator() { |
275 } |
279 } |
276 |
280 |
277 void ZConcurrentRootsIterator::do_jni_handles(ZRootsIteratorClosure* cl) { |
281 void ZConcurrentRootsIterator::do_jni_handles(ZRootsIteratorClosure* cl) { |
278 ZStatTimer timer(ZSubPhaseConcurrentRootsJNIHandles); |
282 ZStatTimer timer(ZSubPhaseConcurrentRootsJNIHandles); |
279 _jni_handles_iter.oops_do(cl); |
283 _jni_handles_iter.oops_do(cl); |
|
284 } |
|
285 |
|
286 void ZConcurrentRootsIterator::do_vm_handles(ZRootsIteratorClosure* cl) { |
|
287 ZStatTimer timer(ZSubPhaseConcurrentRootsVMHandles); |
|
288 _vm_handles_iter.oops_do(cl); |
280 } |
289 } |
281 |
290 |
282 void ZConcurrentRootsIterator::do_class_loader_data_graph(ZRootsIteratorClosure* cl) { |
291 void ZConcurrentRootsIterator::do_class_loader_data_graph(ZRootsIteratorClosure* cl) { |
283 ZStatTimer timer(ZSubPhaseConcurrentRootsClassLoaderDataGraph); |
292 ZStatTimer timer(ZSubPhaseConcurrentRootsClassLoaderDataGraph); |
284 CLDToOopClosure cld_cl(cl, _cld_claim); |
293 CLDToOopClosure cld_cl(cl, _cld_claim); |
286 } |
295 } |
287 |
296 |
288 void ZConcurrentRootsIterator::oops_do(ZRootsIteratorClosure* cl) { |
297 void ZConcurrentRootsIterator::oops_do(ZRootsIteratorClosure* cl) { |
289 ZStatTimer timer(ZSubPhaseConcurrentRoots); |
298 ZStatTimer timer(ZSubPhaseConcurrentRoots); |
290 _jni_handles.oops_do(cl); |
299 _jni_handles.oops_do(cl); |
|
300 _vm_handles.oops_do(cl), |
291 _class_loader_data_graph.oops_do(cl); |
301 _class_loader_data_graph.oops_do(cl); |
292 } |
302 } |
293 |
303 |
294 ZWeakRootsIterator::ZWeakRootsIterator() : |
304 ZWeakRootsIterator::ZWeakRootsIterator() : |
295 _jvmti_weak_export(this), |
305 _jvmti_weak_export(this), |