index

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

Print this page
rev 7184 : 6979279
rev 7185 : [mq]: rev1

*** 658,668 **** gclog_or_tty->print_cr("CM Sleep Factor %1.4lf", sleep_factor()); gclog_or_tty->print_cr("CL Marking Task Overhead %1.4lf", cleanup_task_overhead()); gclog_or_tty->print_cr("CL Sleep Factor %1.4lf", cleanup_sleep_factor()); #endif - guarantee(parallel_marking_threads() > 0, "peace of mind"); _parallel_workers = new FlexibleWorkGang("G1 Parallel Marking Threads", _max_parallel_marking_threads, false, true); if (_parallel_workers == NULL) { vm_exit_during_initialization("Failed necessary allocation."); } else { --- 658,667 ----
*** 1223,1238 **** assert(parallel_marking_threads() <= max_parallel_marking_threads(), "Maximum number of marking threads exceeded"); uint active_workers = MAX2(1U, parallel_marking_threads()); CMRootRegionScanTask task(this); ! if (use_parallel_marking_threads()) { ! _parallel_workers->set_active_workers((int) active_workers); _parallel_workers->run_task(&task); - } else { - task.work(0); - } // It's possible that has_aborted() is true here without actually // aborting the survivor scan earlier. This is OK as it's // mainly used for sanity checking. root_regions()->scan_finished(); --- 1222,1233 ---- assert(parallel_marking_threads() <= max_parallel_marking_threads(), "Maximum number of marking threads exceeded"); uint active_workers = MAX2(1U, parallel_marking_threads()); CMRootRegionScanTask task(this); ! _parallel_workers->set_active_workers(active_workers); _parallel_workers->run_task(&task); // It's possible that has_aborted() is true here without actually // aborting the survivor scan earlier. This is OK as it's // mainly used for sanity checking. root_regions()->scan_finished();
*** 1259,1277 **** // Parallel task terminator is set in "set_concurrency_and_phase()" set_concurrency_and_phase(active_workers, true /* concurrent */); CMConcurrentMarkingTask markingTask(this, cmThread()); ! if (use_parallel_marking_threads()) { ! _parallel_workers->set_active_workers((int)active_workers); // Don't set _n_par_threads because it affects MT in process_roots() // and the decisions on that MT processing is made elsewhere. assert(_parallel_workers->active_workers() > 0, "Should have been set"); _parallel_workers->run_task(&markingTask); - } else { - markingTask.work(0); - } print_stats(); } // Helper class to get rid of some boilerplate code. class G1CMTraceTime : public GCTraceTime { --- 1254,1268 ---- // Parallel task terminator is set in "set_concurrency_and_phase()" set_concurrency_and_phase(active_workers, true /* concurrent */); CMConcurrentMarkingTask markingTask(this, cmThread()); ! _parallel_workers->set_active_workers(active_workers); // Don't set _n_par_threads because it affects MT in process_roots() // and the decisions on that MT processing is made elsewhere. assert(_parallel_workers->active_workers() > 0, "Should have been set"); _parallel_workers->run_task(&markingTask); print_stats(); } // Helper class to get rid of some boilerplate code. class G1CMTraceTime : public GCTraceTime {
*** 3339,3351 **** cmThread()->vtime_accum(), cmThread()->vtime_mark_accum()); } void ConcurrentMark::print_worker_threads_on(outputStream* st) const { - if (use_parallel_marking_threads()) { _parallel_workers->print_worker_threads_on(st); - } } void ConcurrentMark::print_on_error(outputStream* st) const { st->print_cr("Marking Bits (Prev, Next): (CMBitMap*) " PTR_FORMAT ", (CMBitMap*) " PTR_FORMAT, p2i(_prevMarkBitMap), p2i(_nextMarkBitMap)); --- 3330,3340 ----
index