< prev index next >

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

Print this page




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




1043 
1044   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1045   _parallel_workers->set_active_workers(active_workers);
1046   _parallel_workers->run_task(&markingTask);
1047   print_stats();
1048 }
1049 
1050 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1051   // world is stopped at this checkpoint
1052   assert(SafepointSynchronize::is_at_safepoint(),
1053          "world should be stopped");
1054 
1055   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1056 
1057   // If a full collection has happened, we shouldn't do this.
1058   if (has_aborted()) {
1059     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1060     return;
1061   }
1062 


1063   if (VerifyDuringGC) {
1064     HandleMark hm;  // handle scope
1065     g1h->prepare_for_verify();
1066     Universe::verify(VerifyOption_G1UsePrevMarking, "During GC (before)");
1067   }
1068   g1h->verifier()->check_bitmaps("Remark Start");
1069 
1070   G1CollectorPolicy* g1p = g1h->g1_policy();
1071   g1p->record_concurrent_mark_remark_start();
1072 
1073   double start = os::elapsedTime();
1074 
1075   checkpointRootsFinalWork();
1076 
1077   double mark_work_end = os::elapsedTime();
1078 
1079   weakRefsWork(clear_all_soft_refs);
1080 
1081   if (has_overflown()) {
1082     // Oops.  We overflowed.  Restart concurrent marking.


< prev index next >