< prev index next >
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Print this page
rev 7792 : 8149347: G1: guarantee fails with UseDynamicNumberOfGCThreads
Reviewed-by: poonam, kevinw
rev 7793 : 8149347: G1: guarantee fails with UseDynamicNumberOfGCThreads
Reviewed-by: poonam, kevinw
rev 7794 : 8149347: G1: guarantee fails with UseDynamicNumberOfGCThreads
Reviewed-by: poonam, kevinw
*** 3989,4000 ****
_gc_tracer_stw->report_yc_type(yc_type());
TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
! uint active_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
! workers()->active_workers() : 1);
double pause_start_sec = os::elapsedTime();
g1_policy()->phase_times()->note_gc_start(active_workers, mark_in_progress());
log_gc_header();
TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
--- 3989,4007 ----
_gc_tracer_stw->report_yc_type(yc_type());
TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
! uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
! workers()->active_workers(),
! Threads::number_of_non_daemon_threads());
! assert(UseDynamicNumberOfGCThreads ||
! active_workers == workers()->total_workers(),
! "If not dynamic should be using all the workers");
! workers()->set_active_workers(active_workers);
!
!
double pause_start_sec = os::elapsedTime();
g1_policy()->phase_times()->note_gc_start(active_workers, mark_in_progress());
log_gc_header();
TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
*** 5759,5785 ****
// Disable the hot card cache.
G1HotCardCache* hot_card_cache = _cg1r->hot_card_cache();
hot_card_cache->reset_hot_cache_claimed_index();
hot_card_cache->set_use_cache(false);
! uint n_workers;
! if (G1CollectedHeap::use_parallel_gc_threads()) {
! n_workers =
! AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
! workers()->active_workers(),
! Threads::number_of_non_daemon_threads());
assert(UseDynamicNumberOfGCThreads ||
n_workers == workers()->total_workers(),
"If not dynamic should be using all the workers");
- workers()->set_active_workers(n_workers);
set_par_threads(n_workers);
- } else {
- assert(n_par_threads() == 0,
- "Should be the original non-parallel value");
- n_workers = 1;
- }
-
init_for_evac_failure(NULL);
rem_set()->prepare_for_younger_refs_iterate(true);
--- 5766,5780 ----
// Disable the hot card cache.
G1HotCardCache* hot_card_cache = _cg1r->hot_card_cache();
hot_card_cache->reset_hot_cache_claimed_index();
hot_card_cache->set_use_cache(false);
! const uint n_workers = workers()->active_workers();
assert(UseDynamicNumberOfGCThreads ||
n_workers == workers()->total_workers(),
"If not dynamic should be using all the workers");
set_par_threads(n_workers);
init_for_evac_failure(NULL);
rem_set()->prepare_for_younger_refs_iterate(true);
< prev index next >