< prev index next >

src/share/vm/gc/cms/parNewGeneration.cpp

Print this page
rev 11459 : create_thread_failed: fix errors from thread creation failures
rev 11460 : refactor: switch to update_active_threads()

*** 896,906 **** assert(workers != NULL, "Need workgang for parallel work"); uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers->total_workers(), workers->active_workers(), Threads::number_of_non_daemon_threads()); ! workers->set_active_workers(active_workers); _old_gen = gch->old_gen(); // If the next generation is too full to accommodate worst-case promotion // from this generation, pass on collection; let the next generation // do it. --- 896,906 ---- assert(workers != NULL, "Need workgang for parallel work"); uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers->total_workers(), workers->active_workers(), Threads::number_of_non_daemon_threads()); ! active_workers = workers->update_active_workers(active_workers); _old_gen = gch->old_gen(); // If the next generation is too full to accommodate worst-case promotion // from this generation, pass on collection; let the next generation // do it.
*** 950,960 **** gch->rem_set()->prepare_for_younger_refs_iterate(true); // It turns out that even when we're using 1 thread, doing the work in a // separate thread causes wide variance in run times. We can't help this // in the multi-threaded case, but we special-case n=1 here to get // repeatable measurements of the 1-thread overhead of the parallel code. ! if (active_workers > 1) { workers->run_task(&tsk); } else { tsk.work(0); } } --- 950,962 ---- gch->rem_set()->prepare_for_younger_refs_iterate(true); // It turns out that even when we're using 1 thread, doing the work in a // separate thread causes wide variance in run times. We can't help this // in the multi-threaded case, but we special-case n=1 here to get // repeatable measurements of the 1-thread overhead of the parallel code. ! // Might multiple workers ever be used? If yes, initialization ! // has been done such that the single threaded path should not be used. ! if (workers->total_workers() > 1) { workers->run_task(&tsk); } else { tsk.work(0); } }
< prev index next >