< prev index next >

src/hotspot/share/gc/parallel/pcTasks.cpp

Print this page




  64     _java_thread->oops_do(
  65         &mark_and_push_closure,
  66         &mark_and_push_in_blobs);
  67 
  68   if (_vm_thread != NULL)
  69     _vm_thread->oops_do(
  70         &mark_and_push_closure,
  71         &mark_and_push_in_blobs);
  72 
  73   // Do the real work
  74   cm->follow_marking_stacks();
  75 }
  76 
  77 
  78 void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
  79   assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
  80 
  81   ParCompactionManager* cm =
  82     ParCompactionManager::gc_thread_compaction_manager(which);
  83   ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm);
  84   ParCompactionManager::FollowKlassClosure follow_klass_closure(&mark_and_push_closure);
  85 
  86   switch (_root_type) {
  87     case universe:
  88       Universe::oops_do(&mark_and_push_closure);
  89       break;
  90 
  91     case jni_handles:
  92       JNIHandles::oops_do(&mark_and_push_closure);
  93       break;
  94 
  95     case threads:
  96     {
  97       ResourceMark rm;
  98       MarkingCodeBlobClosure each_active_code_blob(&mark_and_push_closure, !CodeBlobToOopClosure::FixRelocations);
  99       Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
 100     }
 101     break;
 102 
 103     case object_synchronizer:
 104       ObjectSynchronizer::oops_do(&mark_and_push_closure);
 105       break;
 106 
 107     case management:
 108       Management::oops_do(&mark_and_push_closure);
 109       break;
 110 
 111     case jvmti:
 112       JvmtiExport::oops_do(&mark_and_push_closure);
 113       break;
 114 
 115     case system_dictionary:
 116       SystemDictionary::always_strong_oops_do(&mark_and_push_closure);
 117       break;
 118 
 119     case class_loader_data:
 120       ClassLoaderDataGraph::always_strong_oops_do(&mark_and_push_closure, &follow_klass_closure, true);
 121       break;
 122 
 123     case code_cache:
 124       // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
 125       //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure));
 126       AOTLoader::oops_do(&mark_and_push_closure);
 127       break;
 128 
 129     default:
 130       fatal("Unknown root type");
 131   }
 132 
 133   // Do the real work
 134   cm->follow_marking_stacks();
 135 }
 136 
 137 
 138 //
 139 // RefProcTaskProxy
 140 //




  64     _java_thread->oops_do(
  65         &mark_and_push_closure,
  66         &mark_and_push_in_blobs);
  67 
  68   if (_vm_thread != NULL)
  69     _vm_thread->oops_do(
  70         &mark_and_push_closure,
  71         &mark_and_push_in_blobs);
  72 
  73   // Do the real work
  74   cm->follow_marking_stacks();
  75 }
  76 
  77 
  78 void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
  79   assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
  80 
  81   ParCompactionManager* cm =
  82     ParCompactionManager::gc_thread_compaction_manager(which);
  83   ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm);

  84 
  85   switch (_root_type) {
  86     case universe:
  87       Universe::oops_do(&mark_and_push_closure);
  88       break;
  89 
  90     case jni_handles:
  91       JNIHandles::oops_do(&mark_and_push_closure);
  92       break;
  93 
  94     case threads:
  95     {
  96       ResourceMark rm;
  97       MarkingCodeBlobClosure each_active_code_blob(&mark_and_push_closure, !CodeBlobToOopClosure::FixRelocations);
  98       Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
  99     }
 100     break;
 101 
 102     case object_synchronizer:
 103       ObjectSynchronizer::oops_do(&mark_and_push_closure);
 104       break;
 105 
 106     case management:
 107       Management::oops_do(&mark_and_push_closure);
 108       break;
 109 
 110     case jvmti:
 111       JvmtiExport::oops_do(&mark_and_push_closure);
 112       break;
 113 
 114     case system_dictionary:
 115       SystemDictionary::always_strong_oops_do(&mark_and_push_closure);
 116       break;
 117 
 118     case class_loader_data:
 119       ClassLoaderDataGraph::always_strong_oops_do(&mark_and_push_closure, true);
 120       break;
 121 
 122     case code_cache:
 123       // Do not treat nmethods as strong roots for mark/sweep, since we can unload them.
 124       //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure));
 125       AOTLoader::oops_do(&mark_and_push_closure);
 126       break;
 127 
 128     default:
 129       fatal("Unknown root type");
 130   }
 131 
 132   // Do the real work
 133   cm->follow_marking_stacks();
 134 }
 135 
 136 
 137 //
 138 // RefProcTaskProxy
 139 //


< prev index next >