< prev index next >
src/share/vm/gc/g1/g1CollectedHeap.cpp
Print this page
*** 1750,1760 ****
_workers->initialize_workers();
_allocator = G1Allocator::create_allocator(this);
_humongous_object_threshold_in_words = HeapRegion::GrainWords / 2;
! int n_queues = MAX2((int)ParallelGCThreads, 1);
_task_queues = new RefToScanQueueSet(n_queues);
uint n_rem_sets = HeapRegionRemSet::num_par_rem_sets();
assert(n_rem_sets > 0, "Invariant.");
--- 1750,1760 ----
_workers->initialize_workers();
_allocator = G1Allocator::create_allocator(this);
_humongous_object_threshold_in_words = HeapRegion::GrainWords / 2;
! int n_queues = (int)ParallelGCThreads;
_task_queues = new RefToScanQueueSet(n_queues);
uint n_rem_sets = HeapRegionRemSet::num_par_rem_sets();
assert(n_rem_sets > 0, "Invariant.");
*** 2062,2076 ****
// Concurrent Mark ref processor
_ref_processor_cm =
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1),
// mt processing
! (int) ParallelGCThreads,
// degree of mt processing
(ParallelGCThreads > 1) || (ConcGCThreads > 1),
// mt discovery
! (int) MAX2(ParallelGCThreads, ConcGCThreads),
// degree of mt discovery
false,
// Reference discovery is not atomic
&_is_alive_closure_cm);
// is alive closure
--- 2062,2076 ----
// Concurrent Mark ref processor
_ref_processor_cm =
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1),
// mt processing
! (uint) ParallelGCThreads,
// degree of mt processing
(ParallelGCThreads > 1) || (ConcGCThreads > 1),
// mt discovery
! (uint) MAX2(ParallelGCThreads, ConcGCThreads),
// degree of mt discovery
false,
// Reference discovery is not atomic
&_is_alive_closure_cm);
// is alive closure
*** 2079,2093 ****
// STW ref processor
_ref_processor_stw =
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1),
// mt processing
! MAX2((int)ParallelGCThreads, 1),
// degree of mt processing
(ParallelGCThreads > 1),
// mt discovery
! MAX2((int)ParallelGCThreads, 1),
// degree of mt discovery
true,
// Reference discovery is atomic
&_is_alive_closure_stw);
// is alive closure
--- 2079,2093 ----
// STW ref processor
_ref_processor_stw =
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1),
// mt processing
! (uint) ParallelGCThreads,
// degree of mt processing
(ParallelGCThreads > 1),
// mt discovery
! (uint) ParallelGCThreads,
// degree of mt discovery
true,
// Reference discovery is atomic
&_is_alive_closure_stw);
// is alive closure
*** 2483,2494 ****
// the time stamps. Called when we reset the GC time stamp.
void G1CollectedHeap::clear_cset_start_regions() {
assert(_worker_cset_start_region != NULL, "sanity");
assert(_worker_cset_start_region_time_stamp != NULL, "sanity");
! int n_queues = MAX2((int)ParallelGCThreads, 1);
! for (int i = 0; i < n_queues; i++) {
_worker_cset_start_region[i] = NULL;
_worker_cset_start_region_time_stamp[i] = 0;
}
}
--- 2483,2494 ----
// the time stamps. Called when we reset the GC time stamp.
void G1CollectedHeap::clear_cset_start_regions() {
assert(_worker_cset_start_region != NULL, "sanity");
assert(_worker_cset_start_region_time_stamp != NULL, "sanity");
! uint n_queues = (uint)ParallelGCThreads;
! for (uint i = 0; i < n_queues; i++) {
_worker_cset_start_region[i] = NULL;
_worker_cset_start_region_time_stamp[i] = 0;
}
}
*** 3842,3852 ****
_young_list->reset_auxilary_lists();
if (evacuation_failed()) {
_allocator->set_used(recalculate_used());
! uint n_queues = MAX2((int)ParallelGCThreads, 1);
for (uint i = 0; i < n_queues; i++) {
if (_evacuation_failed_info_array[i].has_failed()) {
_gc_tracer_stw->report_evacuation_failed(_evacuation_failed_info_array[i]);
}
}
--- 3842,3852 ----
_young_list->reset_auxilary_lists();
if (evacuation_failed()) {
_allocator->set_used(recalculate_used());
! uint n_queues = (uint)ParallelGCThreads;
for (uint i = 0; i < n_queues; i++) {
if (_evacuation_failed_info_array[i].has_failed()) {
_gc_tracer_stw->report_evacuation_failed(_evacuation_failed_info_array[i]);
}
}
< prev index next >