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

Print this page
rev 3952 : 8005875: G1: Kitchensink fails with ParallelGCThreads=0
Summary: Check that the concurrent marking worker gang exists in ConcurrentMark::print_worker_threads_on().
Reviewed-by:


3225                          (_cleanup_times.num() > 0 ? _total_counting_time * 1000.0 /
3226                           (double)_cleanup_times.num()
3227                          : 0.0));
3228   if (G1ScrubRemSets) {
3229     gclog_or_tty->print_cr("    RS scrub total time = %8.2f s (avg = %8.2f ms).",
3230                            _total_rs_scrub_time,
3231                            (_cleanup_times.num() > 0 ? _total_rs_scrub_time * 1000.0 /
3232                             (double)_cleanup_times.num()
3233                            : 0.0));
3234   }
3235   gclog_or_tty->print_cr("  Total stop_world time = %8.2f s.",
3236                          (_init_times.sum() + _remark_times.sum() +
3237                           _cleanup_times.sum())/1000.0);
3238   gclog_or_tty->print_cr("  Total concurrent time = %8.2f s "
3239                 "(%8.2f s marking).",
3240                 cmThread()->vtime_accum(),
3241                 cmThread()->vtime_mark_accum());
3242 }
3243 
3244 void ConcurrentMark::print_worker_threads_on(outputStream* st) const {

3245   _parallel_workers->print_worker_threads_on(st);

3246 }
3247 
3248 // We take a break if someone is trying to stop the world.
3249 bool ConcurrentMark::do_yield_check(uint worker_id) {
3250   if (should_yield()) {
3251     if (worker_id == 0) {
3252       _g1h->g1_policy()->record_concurrent_pause();
3253     }
3254     cmThread()->yield();
3255     return true;
3256   } else {
3257     return false;
3258   }
3259 }
3260 
3261 bool ConcurrentMark::should_yield() {
3262   return cmThread()->should_yield();
3263 }
3264 
3265 bool ConcurrentMark::containing_card_is_marked(void* p) {




3225                          (_cleanup_times.num() > 0 ? _total_counting_time * 1000.0 /
3226                           (double)_cleanup_times.num()
3227                          : 0.0));
3228   if (G1ScrubRemSets) {
3229     gclog_or_tty->print_cr("    RS scrub total time = %8.2f s (avg = %8.2f ms).",
3230                            _total_rs_scrub_time,
3231                            (_cleanup_times.num() > 0 ? _total_rs_scrub_time * 1000.0 /
3232                             (double)_cleanup_times.num()
3233                            : 0.0));
3234   }
3235   gclog_or_tty->print_cr("  Total stop_world time = %8.2f s.",
3236                          (_init_times.sum() + _remark_times.sum() +
3237                           _cleanup_times.sum())/1000.0);
3238   gclog_or_tty->print_cr("  Total concurrent time = %8.2f s "
3239                 "(%8.2f s marking).",
3240                 cmThread()->vtime_accum(),
3241                 cmThread()->vtime_mark_accum());
3242 }
3243 
3244 void ConcurrentMark::print_worker_threads_on(outputStream* st) const {
3245   if (parallel_marking_threads() > 0) {
3246     _parallel_workers->print_worker_threads_on(st);
3247   }
3248 }
3249 
3250 // We take a break if someone is trying to stop the world.
3251 bool ConcurrentMark::do_yield_check(uint worker_id) {
3252   if (should_yield()) {
3253     if (worker_id == 0) {
3254       _g1h->g1_policy()->record_concurrent_pause();
3255     }
3256     cmThread()->yield();
3257     return true;
3258   } else {
3259     return false;
3260   }
3261 }
3262 
3263 bool ConcurrentMark::should_yield() {
3264   return cmThread()->should_yield();
3265 }
3266 
3267 bool ConcurrentMark::containing_card_is_marked(void* p) {