< prev index next >

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

Print this page




1055 
1056   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1057   _parallel_workers->set_active_workers(active_workers);
1058   _parallel_workers->run_task(&markingTask);
1059   print_stats();
1060 }
1061 
1062 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1063   // world is stopped at this checkpoint
1064   assert(SafepointSynchronize::is_at_safepoint(),
1065          "world should be stopped");
1066 
1067   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1068 
1069   // If a full collection has happened, we shouldn't do this.
1070   if (has_aborted()) {
1071     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1072     return;
1073   }
1074 
1075   SvcGCMarker sgcm(SvcGCMarker::OTHER);
1076 
1077   if (VerifyDuringGC) {
1078     HandleMark hm;  // handle scope
1079     g1h->prepare_for_verify();
1080     Universe::verify(VerifyOption_G1UsePrevMarking, "During GC (before)");
1081   }
1082   g1h->verifier()->check_bitmaps("Remark Start");
1083 
1084   G1CollectorPolicy* g1p = g1h->g1_policy();
1085   g1p->record_concurrent_mark_remark_start();
1086 
1087   double start = os::elapsedTime();
1088 
1089   checkpointRootsFinalWork();
1090 
1091   double mark_work_end = os::elapsedTime();
1092 
1093   weakRefsWork(clear_all_soft_refs);
1094 
1095   if (has_overflown()) {
1096     // Oops.  We overflowed.  Restart concurrent marking.




1055 
1056   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1057   _parallel_workers->set_active_workers(active_workers);
1058   _parallel_workers->run_task(&markingTask);
1059   print_stats();
1060 }
1061 
1062 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1063   // world is stopped at this checkpoint
1064   assert(SafepointSynchronize::is_at_safepoint(),
1065          "world should be stopped");
1066 
1067   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1068 
1069   // If a full collection has happened, we shouldn't do this.
1070   if (has_aborted()) {
1071     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1072     return;
1073   }
1074 


1075   if (VerifyDuringGC) {
1076     HandleMark hm;  // handle scope
1077     g1h->prepare_for_verify();
1078     Universe::verify(VerifyOption_G1UsePrevMarking, "During GC (before)");
1079   }
1080   g1h->verifier()->check_bitmaps("Remark Start");
1081 
1082   G1CollectorPolicy* g1p = g1h->g1_policy();
1083   g1p->record_concurrent_mark_remark_start();
1084 
1085   double start = os::elapsedTime();
1086 
1087   checkpointRootsFinalWork();
1088 
1089   double mark_work_end = os::elapsedTime();
1090 
1091   weakRefsWork(clear_all_soft_refs);
1092 
1093   if (has_overflown()) {
1094     // Oops.  We overflowed.  Restart concurrent marking.


< prev index next >