< prev index next >

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

Print this page




 995   set_concurrency_and_phase(active_workers, true /* concurrent */);
 996 
 997   G1CMConcurrentMarkingTask marking_task(this, cm_thread());
 998   _concurrent_workers->run_task(&marking_task);
 999   print_stats();
1000 }
1001 
1002 void G1ConcurrentMark::checkpoint_roots_final(bool clear_all_soft_refs) {
1003   // world is stopped at this checkpoint
1004   assert(SafepointSynchronize::is_at_safepoint(),
1005          "world should be stopped");
1006 
1007   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1008 
1009   // If a full collection has happened, we shouldn't do this.
1010   if (has_aborted()) {
1011     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1012     return;
1013   }
1014 
1015   SvcGCMarker sgcm(SvcGCMarker::OTHER);
1016 
1017   if (VerifyDuringGC) {
1018     g1h->verifier()->verify(G1HeapVerifier::G1VerifyRemark, VerifyOption_G1UsePrevMarking, "During GC (before)");
1019   }
1020   g1h->verifier()->check_bitmaps("Remark Start");
1021 
1022   G1Policy* g1p = g1h->g1_policy();
1023   g1p->record_concurrent_mark_remark_start();
1024 
1025   double start = os::elapsedTime();
1026 
1027   checkpoint_roots_final_work();
1028 
1029   double mark_work_end = os::elapsedTime();
1030 
1031   weak_refs_work(clear_all_soft_refs);
1032 
1033   if (has_overflown()) {
1034     // We overflowed.  Restart concurrent marking.
1035     _restart_for_overflow = true;
1036 




 995   set_concurrency_and_phase(active_workers, true /* concurrent */);
 996 
 997   G1CMConcurrentMarkingTask marking_task(this, cm_thread());
 998   _concurrent_workers->run_task(&marking_task);
 999   print_stats();
1000 }
1001 
1002 void G1ConcurrentMark::checkpoint_roots_final(bool clear_all_soft_refs) {
1003   // world is stopped at this checkpoint
1004   assert(SafepointSynchronize::is_at_safepoint(),
1005          "world should be stopped");
1006 
1007   G1CollectedHeap* g1h = G1CollectedHeap::heap();
1008 
1009   // If a full collection has happened, we shouldn't do this.
1010   if (has_aborted()) {
1011     g1h->collector_state()->set_mark_in_progress(false); // So bitmap clearing isn't confused
1012     return;
1013   }
1014 


1015   if (VerifyDuringGC) {
1016     g1h->verifier()->verify(G1HeapVerifier::G1VerifyRemark, VerifyOption_G1UsePrevMarking, "During GC (before)");
1017   }
1018   g1h->verifier()->check_bitmaps("Remark Start");
1019 
1020   G1Policy* g1p = g1h->g1_policy();
1021   g1p->record_concurrent_mark_remark_start();
1022 
1023   double start = os::elapsedTime();
1024 
1025   checkpoint_roots_final_work();
1026 
1027   double mark_work_end = os::elapsedTime();
1028 
1029   weak_refs_work(clear_all_soft_refs);
1030 
1031   if (has_overflown()) {
1032     // We overflowed.  Restart concurrent marking.
1033     _restart_for_overflow = true;
1034 


< prev index next >