< prev index next >

src/hotspot/share/gc/g1/g1FullGCMarkTask.cpp

Print this page




  44 
  45 void G1FullGCMarkTask::work(uint worker_id) {
  46   Ticks start = Ticks::now();
  47   ResourceMark rm;
  48   G1FullGCMarker* marker = collector()->marker(worker_id);
  49   MarkingCodeBlobClosure code_closure(marker->mark_closure(), !CodeBlobToOopClosure::FixRelocations);
  50 
  51   if (ClassUnloading) {
  52     _root_processor.process_strong_roots(
  53         marker->mark_closure(),
  54         marker->cld_closure(),
  55         &code_closure);
  56   } else {
  57     _root_processor.process_all_roots_no_string_table(
  58         marker->mark_closure(),
  59         marker->cld_closure(),
  60         &code_closure);
  61   }
  62 
  63   // Mark stack is populated, now process and drain it.
  64   marker->complete_marking(collector()->oop_queue_set(), collector()->array_queue_set(), &_terminator);
  65 
  66   // This is the point where the entire marking should have completed.
  67   assert(marker->oop_stack()->is_empty(), "Marking should have completed");
  68   assert(marker->objarray_stack()->is_empty(), "Array marking should have completed");
  69   log_task("Marking task", worker_id, start);
  70 }


  44 
  45 void G1FullGCMarkTask::work(uint worker_id) {
  46   Ticks start = Ticks::now();
  47   ResourceMark rm;
  48   G1FullGCMarker* marker = collector()->marker(worker_id);
  49   MarkingCodeBlobClosure code_closure(marker->mark_closure(), !CodeBlobToOopClosure::FixRelocations);
  50 
  51   if (ClassUnloading) {
  52     _root_processor.process_strong_roots(
  53         marker->mark_closure(),
  54         marker->cld_closure(),
  55         &code_closure);
  56   } else {
  57     _root_processor.process_all_roots_no_string_table(
  58         marker->mark_closure(),
  59         marker->cld_closure(),
  60         &code_closure);
  61   }
  62 
  63   // Mark stack is populated, now process and drain it.
  64   marker->complete_marking(collector()->oop_queue_set(), collector()->array_queue_set(), _terminator.terminator());
  65 
  66   // This is the point where the entire marking should have completed.
  67   assert(marker->oop_stack()->is_empty(), "Marking should have completed");
  68   assert(marker->objarray_stack()->is_empty(), "Array marking should have completed");
  69   log_task("Marking task", worker_id, start);
  70 }
< prev index next >