comparison src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 8008:256d3f43c177

8005875: G1: Kitchensink fails with ParallelGCThreads=0 Summary: Check that the concurrent marking worker gang exists in ConcurrentMark::print_worker_threads_on(). Changes were also reviewed by Vitaly Davidovich <vitalyd@gmail.com>. Reviewed-by: brutisso
author johnc
date Thu, 31 Jan 2013 10:45:09 -0800
parents 4700e77d44c1
children f90b9bceb8e5
comparison
equal deleted inserted replaced
8007:d9058e388631 8008:256d3f43c177
1188 assert(parallel_marking_threads() <= max_parallel_marking_threads(), 1188 assert(parallel_marking_threads() <= max_parallel_marking_threads(),
1189 "Maximum number of marking threads exceeded"); 1189 "Maximum number of marking threads exceeded");
1190 uint active_workers = MAX2(1U, parallel_marking_threads()); 1190 uint active_workers = MAX2(1U, parallel_marking_threads());
1191 1191
1192 CMRootRegionScanTask task(this); 1192 CMRootRegionScanTask task(this);
1193 if (parallel_marking_threads() > 0) { 1193 if (use_parallel_marking_threads()) {
1194 _parallel_workers->set_active_workers((int) active_workers); 1194 _parallel_workers->set_active_workers((int) active_workers);
1195 _parallel_workers->run_task(&task); 1195 _parallel_workers->run_task(&task);
1196 } else { 1196 } else {
1197 task.work(0); 1197 task.work(0);
1198 } 1198 }
1224 1224
1225 // Parallel task terminator is set in "set_phase()" 1225 // Parallel task terminator is set in "set_phase()"
1226 set_phase(active_workers, true /* concurrent */); 1226 set_phase(active_workers, true /* concurrent */);
1227 1227
1228 CMConcurrentMarkingTask markingTask(this, cmThread()); 1228 CMConcurrentMarkingTask markingTask(this, cmThread());
1229 if (parallel_marking_threads() > 0) { 1229 if (use_parallel_marking_threads()) {
1230 _parallel_workers->set_active_workers((int)active_workers); 1230 _parallel_workers->set_active_workers((int)active_workers);
1231 // Don't set _n_par_threads because it affects MT in proceess_strong_roots() 1231 // Don't set _n_par_threads because it affects MT in proceess_strong_roots()
1232 // and the decisions on that MT processing is made elsewhere. 1232 // and the decisions on that MT processing is made elsewhere.
1233 assert(_parallel_workers->active_workers() > 0, "Should have been set"); 1233 assert(_parallel_workers->active_workers() > 0, "Should have been set");
1234 _parallel_workers->run_task(&markingTask); 1234 _parallel_workers->run_task(&markingTask);
3240 cmThread()->vtime_accum(), 3240 cmThread()->vtime_accum(),
3241 cmThread()->vtime_mark_accum()); 3241 cmThread()->vtime_mark_accum());
3242 } 3242 }
3243 3243
3244 void ConcurrentMark::print_worker_threads_on(outputStream* st) const { 3244 void ConcurrentMark::print_worker_threads_on(outputStream* st) const {
3245 _parallel_workers->print_worker_threads_on(st); 3245 if (use_parallel_marking_threads()) {
3246 _parallel_workers->print_worker_threads_on(st);
3247 }
3246 } 3248 }
3247 3249
3248 // We take a break if someone is trying to stop the world. 3250 // We take a break if someone is trying to stop the world.
3249 bool ConcurrentMark::do_yield_check(uint worker_id) { 3251 bool ConcurrentMark::do_yield_check(uint worker_id) {
3250 if (should_yield()) { 3252 if (should_yield()) {