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