src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp

Print this page
rev 2652 : 7085906: Replace the permgen allocated sentinelRef with a self-looped end
Summary: Remove the sentinelRef and let the last Reference in a discovered chain point back to itself.
Reviewed-by: TBD1, TBD2


  63 
  64   // Do the real work
  65   cm->follow_marking_stacks();
  66 }
  67 
  68 
  69 void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
  70   assert(Universe::heap()->is_gc_active(), "called outside gc");
  71 
  72   NOT_PRODUCT(TraceTime tm("MarkFromRootsTask",
  73     PrintGCDetails && TraceParallelOldGCTasks, true, gclog_or_tty));
  74   ParCompactionManager* cm =
  75     ParCompactionManager::gc_thread_compaction_manager(which);
  76   PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
  77 
  78   switch (_root_type) {
  79     case universe:
  80       Universe::oops_do(&mark_and_push_closure);
  81       break;
  82 
  83     case reference_processing:
  84       ReferenceProcessor::oops_do(&mark_and_push_closure);
  85       break;
  86 
  87     case jni_handles:
  88       JNIHandles::oops_do(&mark_and_push_closure);
  89       break;
  90 
  91     case threads:
  92     {
  93       ResourceMark rm;
  94       CodeBlobToOopClosure each_active_code_blob(&mark_and_push_closure, /*do_marking=*/ true);
  95       Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
  96     }
  97     break;
  98 
  99     case object_synchronizer:
 100       ObjectSynchronizer::oops_do(&mark_and_push_closure);
 101       break;
 102 
 103     case flat_profiler:
 104       FlatProfiler::oops_do(&mark_and_push_closure);
 105       break;
 106 




  63 
  64   // Do the real work
  65   cm->follow_marking_stacks();
  66 }
  67 
  68 
  69 void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) {
  70   assert(Universe::heap()->is_gc_active(), "called outside gc");
  71 
  72   NOT_PRODUCT(TraceTime tm("MarkFromRootsTask",
  73     PrintGCDetails && TraceParallelOldGCTasks, true, gclog_or_tty));
  74   ParCompactionManager* cm =
  75     ParCompactionManager::gc_thread_compaction_manager(which);
  76   PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
  77 
  78   switch (_root_type) {
  79     case universe:
  80       Universe::oops_do(&mark_and_push_closure);
  81       break;
  82 




  83     case jni_handles:
  84       JNIHandles::oops_do(&mark_and_push_closure);
  85       break;
  86 
  87     case threads:
  88     {
  89       ResourceMark rm;
  90       CodeBlobToOopClosure each_active_code_blob(&mark_and_push_closure, /*do_marking=*/ true);
  91       Threads::oops_do(&mark_and_push_closure, &each_active_code_blob);
  92     }
  93     break;
  94 
  95     case object_synchronizer:
  96       ObjectSynchronizer::oops_do(&mark_and_push_closure);
  97       break;
  98 
  99     case flat_profiler:
 100       FlatProfiler::oops_do(&mark_and_push_closure);
 101       break;
 102