< prev index next >

src/share/vm/gc/g1/g1ConcurrentMark.cpp

Print this page




1086   set_concurrency_and_phase(active_workers, true /* concurrent */);
1087 
1088   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1089   _parallel_workers->run_task(&markingTask);
1090   print_stats();
1091 }
1092 
1093 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1094   // world is stopped at this checkpoint
1095   assert(SafepointSynchronize::is_at_safepoint(),
1096          "world should be stopped");
1097 
1098   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1099 
1100   // If a full collection has happened, we shouldn't do this.
1101   if (has_aborted()) {
1102     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1103     return;
1104   }
1105 
1106   SvcGCMarker sgcm(SvcGCMarker::OTHER);
1107 
1108   if (VerifyDuringGC) {
1109     HandleMark hm;  // handle scope
1110     g1h->prepare_for_verify();
1111     Universe::verify(VerifyOption_G1UsePrevMarking, "During GC (before)");
1112   }
1113   g1h->verifier()->check_bitmaps("Remark Start");
1114 
1115   G1Policy* g1p = g1h->g1_policy();
1116   g1p->record_concurrent_mark_remark_start();
1117 
1118   double start = os::elapsedTime();
1119 
1120   checkpointRootsFinalWork();
1121 
1122   double mark_work_end = os::elapsedTime();
1123 
1124   weakRefsWork(clear_all_soft_refs);
1125 
1126   if (has_overflown()) {
1127     // We overflowed.  Restart concurrent marking.




1086   set_concurrency_and_phase(active_workers, true /* concurrent */);
1087 
1088   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1089   _parallel_workers->run_task(&markingTask);
1090   print_stats();
1091 }
1092 
1093 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1094   // world is stopped at this checkpoint
1095   assert(SafepointSynchronize::is_at_safepoint(),
1096          "world should be stopped");
1097 
1098   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1099 
1100   // If a full collection has happened, we shouldn't do this.
1101   if (has_aborted()) {
1102     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1103     return;
1104   }
1105 


1106   if (VerifyDuringGC) {
1107     HandleMark hm;  // handle scope
1108     g1h->prepare_for_verify();
1109     Universe::verify(VerifyOption_G1UsePrevMarking, "During GC (before)");
1110   }
1111   g1h->verifier()->check_bitmaps("Remark Start");
1112 
1113   G1Policy* g1p = g1h->g1_policy();
1114   g1p->record_concurrent_mark_remark_start();
1115 
1116   double start = os::elapsedTime();
1117 
1118   checkpointRootsFinalWork();
1119 
1120   double mark_work_end = os::elapsedTime();
1121 
1122   weakRefsWork(clear_all_soft_refs);
1123 
1124   if (has_overflown()) {
1125     // We overflowed.  Restart concurrent marking.


< prev index next >