< prev index next >

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

Print this page




2641   log.trace("  Total stop_world time = %8.2f s.",
2642             (_init_times.sum() + _remark_times.sum() + _cleanup_times.sum())/1000.0);
2643   log.trace("  Total concurrent time = %8.2f s (%8.2f s marking).",
2644             cmThread()->vtime_accum(), cmThread()->vtime_mark_accum());
2645 }
2646 
2647 void ConcurrentMark::print_worker_threads_on(outputStream* st) const {
2648   _parallel_workers->print_worker_threads_on(st);
2649 }
2650 
2651 void ConcurrentMark::print_on_error(outputStream* st) const {
2652   st->print_cr("Marking Bits (Prev, Next): (CMBitMap*) " PTR_FORMAT ", (CMBitMap*) " PTR_FORMAT,
2653       p2i(_prevMarkBitMap), p2i(_nextMarkBitMap));
2654   _prevMarkBitMap->print_on_error(st, " Prev Bits: ");
2655   _nextMarkBitMap->print_on_error(st, " Next Bits: ");
2656 }
2657 
2658 // We take a break if someone is trying to stop the world.
2659 bool ConcurrentMark::do_yield_check(uint worker_id) {
2660   if (SuspendibleThreadSet::should_yield()) {
2661     if (worker_id == 0) {
2662       _g1h->g1_policy()->record_concurrent_pause();
2663     }
2664     SuspendibleThreadSet::yield();
2665     return true;
2666   } else {
2667     return false;
2668   }
2669 }
2670 
2671 // Closure for iteration over bitmaps
2672 class CMBitMapClosure : public BitMapClosure {
2673 private:
2674   // the bitmap that is being iterated over
2675   CMBitMap*                   _nextMarkBitMap;
2676   ConcurrentMark*             _cm;
2677   CMTask*                     _task;
2678 
2679 public:
2680   CMBitMapClosure(CMTask *task, ConcurrentMark* cm, CMBitMap* nextMarkBitMap) :
2681     _task(task), _cm(cm), _nextMarkBitMap(nextMarkBitMap) { }
2682 
2683   bool do_bit(size_t offset) {




2641   log.trace("  Total stop_world time = %8.2f s.",
2642             (_init_times.sum() + _remark_times.sum() + _cleanup_times.sum())/1000.0);
2643   log.trace("  Total concurrent time = %8.2f s (%8.2f s marking).",
2644             cmThread()->vtime_accum(), cmThread()->vtime_mark_accum());
2645 }
2646 
2647 void ConcurrentMark::print_worker_threads_on(outputStream* st) const {
2648   _parallel_workers->print_worker_threads_on(st);
2649 }
2650 
2651 void ConcurrentMark::print_on_error(outputStream* st) const {
2652   st->print_cr("Marking Bits (Prev, Next): (CMBitMap*) " PTR_FORMAT ", (CMBitMap*) " PTR_FORMAT,
2653       p2i(_prevMarkBitMap), p2i(_nextMarkBitMap));
2654   _prevMarkBitMap->print_on_error(st, " Prev Bits: ");
2655   _nextMarkBitMap->print_on_error(st, " Next Bits: ");
2656 }
2657 
2658 // We take a break if someone is trying to stop the world.
2659 bool ConcurrentMark::do_yield_check(uint worker_id) {
2660   if (SuspendibleThreadSet::should_yield()) {



2661     SuspendibleThreadSet::yield();
2662     return true;
2663   } else {
2664     return false;
2665   }
2666 }
2667 
2668 // Closure for iteration over bitmaps
2669 class CMBitMapClosure : public BitMapClosure {
2670 private:
2671   // the bitmap that is being iterated over
2672   CMBitMap*                   _nextMarkBitMap;
2673   ConcurrentMark*             _cm;
2674   CMTask*                     _task;
2675 
2676 public:
2677   CMBitMapClosure(CMTask *task, ConcurrentMark* cm, CMBitMap* nextMarkBitMap) :
2678     _task(task), _cm(cm), _nextMarkBitMap(nextMarkBitMap) { }
2679 
2680   bool do_bit(size_t offset) {


< prev index next >