< prev index next >
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
Print this page
@@ -834,11 +834,10 @@
void ParNewRefProcTaskExecutor::set_single_threaded_mode()
{
_state_set.flush();
GenCollectedHeap* gch = GenCollectedHeap::heap();
- gch->set_par_threads(0); // 0 ==> non-parallel.
gch->save_marks();
}
ScanClosureWithParBarrier::
ScanClosureWithParBarrier(ParNewGeneration* g, bool gc_barrier) :
@@ -952,11 +951,10 @@
{
StrongRootsScope srs(n_workers);
ParNewGenTask tsk(this, _old_gen, reserved().end(), &thread_state_set, &srs);
- gch->set_par_threads(n_workers);
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.
@@ -994,11 +992,10 @@
stats = rp->process_discovered_references(&is_alive, &keep_alive,
&evacuate_followers, &task_executor,
_gc_timer, _gc_tracer.gc_id());
} else {
thread_state_set.flush();
- gch->set_par_threads(0); // 0 ==> non-parallel.
gch->save_marks();
stats = rp->process_discovered_references(&is_alive, &keep_alive,
&evacuate_followers, NULL,
_gc_timer, _gc_tracer.gc_id());
}
< prev index next >