src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
Print this page
*** 290,306 ****
}
void CMSCollector::ref_processor_init() {
if (_ref_processor == NULL) {
// Allocate and initialize a reference processor
! _ref_processor = ReferenceProcessor::create_ref_processor(
! _span, // span
! _cmsGen->refs_discovery_is_atomic(), // atomic_discovery
! _cmsGen->refs_discovery_is_mt(), // mt_discovery
! &_is_alive_closure,
! ParallelGCThreads,
! ParallelRefProcEnabled);
// Initialize the _ref_processor field of CMSGen
_cmsGen->set_ref_processor(_ref_processor);
// Allocate a dummy ref processor for perm gen.
ReferenceProcessor* rp2 = new ReferenceProcessor();
--- 290,308 ----
}
void CMSCollector::ref_processor_init() {
if (_ref_processor == NULL) {
// Allocate and initialize a reference processor
! _ref_processor =
! new ReferenceProcessor(_span, // span
! (ParallelGCThreads > 1) && ParallelRefProcEnabled, // mt processing
! ParallelGCThreads, // mt processing degree
! _cmsGen->refs_discovery_is_mt(), // mt discovery
! ConcGCThreads, // mt discovery degree
! _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic
! &_is_alive_closure, // closure for liveness info
! false); // next field updates do not need write barrier
// Initialize the _ref_processor field of CMSGen
_cmsGen->set_ref_processor(_ref_processor);
// Allocate a dummy ref processor for perm gen.
ReferenceProcessor* rp2 = new ReferenceProcessor();
*** 5701,5717 ****
--- 5703,5724 ----
CMSCollector* collector,
const MemRegion& span,
CMSBitMap* mark_bit_map,
AbstractWorkGang* workers,
OopTaskQueueSet* task_queues):
+ // XXX Should superclass AGTWOQ also know about AWG since it knows
+ // about the task_queues used by the AWG? Then it could initialize
+ // the terminator() object. See 6984287. The set_for_termination()
+ // below is a temporary band-aid for the regression in 6984287.
AbstractGangTaskWOopQueues("Process referents by policy in parallel",
task_queues),
_task(task),
_collector(collector), _span(span), _mark_bit_map(mark_bit_map)
{
assert(_collector->_span.equals(_span) && !_span.is_empty(),
"Inconsistency in _span");
+ set_for_termination(workers->active_workers());
}
OopTaskQueueSet* task_queues() { return queues(); }
OopTaskQueue* work_queue(int i) { return task_queues()->queue(i); }