< prev index next >

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

Print this page




1028   set_concurrency_and_phase(active_workers, true /* concurrent */);
1029 
1030   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1031   _parallel_workers->run_task(&markingTask);
1032   print_stats();
1033 }
1034 
1035 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1036   // world is stopped at this checkpoint
1037   assert(SafepointSynchronize::is_at_safepoint(),
1038          "world should be stopped");
1039 
1040   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1041 
1042   // If a full collection has happened, we shouldn't do this.
1043   if (has_aborted()) {
1044     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1045     return;
1046   }
1047 
1048   SvcGCMarker sgcm(SvcGCMarker::OTHER);
1049 
1050   if (VerifyDuringGC) {
1051     HandleMark hm;  // handle scope
1052     g1h->prepare_for_verify();
1053     Universe::verify(VerifyOption_G1UsePrevMarking, "During GC (before)");
1054   }
1055   g1h->verifier()->check_bitmaps("Remark Start");
1056 
1057   G1Policy* g1p = g1h->g1_policy();
1058   g1p->record_concurrent_mark_remark_start();
1059 
1060   double start = os::elapsedTime();
1061 
1062   checkpointRootsFinalWork();
1063 
1064   double mark_work_end = os::elapsedTime();
1065 
1066   weakRefsWork(clear_all_soft_refs);
1067 
1068   if (has_overflown()) {
1069     // We overflowed.  Restart concurrent marking.




1028   set_concurrency_and_phase(active_workers, true /* concurrent */);
1029 
1030   G1CMConcurrentMarkingTask markingTask(this, cmThread());
1031   _parallel_workers->run_task(&markingTask);
1032   print_stats();
1033 }
1034 
1035 void G1ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
1036   // world is stopped at this checkpoint
1037   assert(SafepointSynchronize::is_at_safepoint(),
1038          "world should be stopped");
1039 
1040   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1041 
1042   // If a full collection has happened, we shouldn't do this.
1043   if (has_aborted()) {
1044     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1045     return;
1046   }
1047 


1048   if (VerifyDuringGC) {
1049     HandleMark hm;  // handle scope
1050     g1h->prepare_for_verify();
1051     Universe::verify(VerifyOption_G1UsePrevMarking, "During GC (before)");
1052   }
1053   g1h->verifier()->check_bitmaps("Remark Start");
1054 
1055   G1Policy* g1p = g1h->g1_policy();
1056   g1p->record_concurrent_mark_remark_start();
1057 
1058   double start = os::elapsedTime();
1059 
1060   checkpointRootsFinalWork();
1061 
1062   double mark_work_end = os::elapsedTime();
1063 
1064   weakRefsWork(clear_all_soft_refs);
1065 
1066   if (has_overflown()) {
1067     // We overflowed.  Restart concurrent marking.


< prev index next >