592 StrongRootsScope srs(activate_scope);
593
594 // General roots.
595 assert(Threads::thread_claim_parity() != 0, "must have called prologue code");
596 assert(code_roots != NULL, "code root closure should always be set");
597 // _n_termination for _process_strong_tasks should be set up stream
598 // in a method not running in a GC worker. Otherwise the GC worker
599 // could be trying to change the termination condition while the task
600 // is executing in another GC worker.
601
602 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ClassLoaderDataGraph_oops_do)) {
603 ClassLoaderDataGraph::roots_cld_do(strong_cld_closure, weak_cld_closure);
604 }
605
606 // Some CLDs contained in the thread frames should be considered strong.
607 // Don't process them if they will be processed during the ClassLoaderDataGraph phase.
608 CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL;
609 // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway
610 CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots;
611
612 bool is_par = n_par_threads() > 0;
613 Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_clds_p, roots_from_code_p);
614
615 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) {
616 Universe::oops_do(strong_roots);
617 }
618 // Global (strong) JNI handles
619 if (!_process_strong_tasks->is_task_claimed(GCH_PS_JNIHandles_oops_do)) {
620 JNIHandles::oops_do(strong_roots);
621 }
622
623 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ObjectSynchronizer_oops_do)) {
624 ObjectSynchronizer::oops_do(strong_roots);
625 }
626 if (!_process_strong_tasks->is_task_claimed(GCH_PS_FlatProfiler_oops_do)) {
627 FlatProfiler::oops_do(strong_roots);
628 }
629 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Management_oops_do)) {
630 Management::oops_do(strong_roots);
631 }
632 if (!_process_strong_tasks->is_task_claimed(GCH_PS_jvmti_oops_do)) {
|
592 StrongRootsScope srs(activate_scope);
593
594 // General roots.
595 assert(Threads::thread_claim_parity() != 0, "must have called prologue code");
596 assert(code_roots != NULL, "code root closure should always be set");
597 // _n_termination for _process_strong_tasks should be set up stream
598 // in a method not running in a GC worker. Otherwise the GC worker
599 // could be trying to change the termination condition while the task
600 // is executing in another GC worker.
601
602 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ClassLoaderDataGraph_oops_do)) {
603 ClassLoaderDataGraph::roots_cld_do(strong_cld_closure, weak_cld_closure);
604 }
605
606 // Some CLDs contained in the thread frames should be considered strong.
607 // Don't process them if they will be processed during the ClassLoaderDataGraph phase.
608 CLDClosure* roots_from_clds_p = (strong_cld_closure != weak_cld_closure) ? strong_cld_closure : NULL;
609 // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway
610 CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots;
611
612 bool is_par = n_par_threads() > 1;
613 Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_clds_p, roots_from_code_p);
614
615 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) {
616 Universe::oops_do(strong_roots);
617 }
618 // Global (strong) JNI handles
619 if (!_process_strong_tasks->is_task_claimed(GCH_PS_JNIHandles_oops_do)) {
620 JNIHandles::oops_do(strong_roots);
621 }
622
623 if (!_process_strong_tasks->is_task_claimed(GCH_PS_ObjectSynchronizer_oops_do)) {
624 ObjectSynchronizer::oops_do(strong_roots);
625 }
626 if (!_process_strong_tasks->is_task_claimed(GCH_PS_FlatProfiler_oops_do)) {
627 FlatProfiler::oops_do(strong_roots);
628 }
629 if (!_process_strong_tasks->is_task_claimed(GCH_PS_Management_oops_do)) {
630 Management::oops_do(strong_roots);
631 }
632 if (!_process_strong_tasks->is_task_claimed(GCH_PS_jvmti_oops_do)) {
|