< prev index next >

src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp

Print this page
rev 49912 : imported patch 8201492-properly-implement-non-contiguous-reference-processing
rev 49913 : imported patch 8201492-stefanj-review
rev 49914 : [mq]: 8201492-kim-review

*** 288,298 **** 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 MAX2(ConcGCThreads, ParallelGCThreads), // mt discovery degree _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic --- 288,298 ---- void CMSCollector::ref_processor_init() { if (_ref_processor == NULL) { // Allocate and initialize a reference processor _ref_processor = ! new ReferenceProcessor(&_span_based_discoverer, (ParallelGCThreads > 1) && ParallelRefProcEnabled, // mt processing ParallelGCThreads, // mt processing degree _cmsGen->refs_discovery_is_mt(), // mt discovery MAX2(ConcGCThreads, ParallelGCThreads), // mt discovery degree _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic
*** 443,464 **** CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen, CardTableRS* ct, ConcurrentMarkSweepPolicy* cp): _cmsGen(cmsGen), _ct(ct), _ref_processor(NULL), // will be set later _conc_workers(NULL), // may be set later _abort_preclean(false), _start_sampling(false), _between_prologue_and_epilogue(false), _markBitMap(0, Mutex::leaf + 1, "CMS_markBitMap_lock"), _modUnionTable((CardTable::card_shift - LogHeapWordSize), -1 /* lock-free */, "No_lock" /* dummy */), _modUnionClosurePar(&_modUnionTable), - // Adjust my span to cover old (cms) gen - _span(cmsGen->reserved()), // Construct the is_alive_closure with _span & markBitMap _is_alive_closure(_span, &_markBitMap), _restart_addr(NULL), _overflow_list(NULL), _stats(cmsGen), --- 443,465 ---- CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen, CardTableRS* ct, ConcurrentMarkSweepPolicy* cp): _cmsGen(cmsGen), + // Adjust span to cover old (cms) gen + _span(cmsGen->reserved()), _ct(ct), + _span_based_discoverer(_span), _ref_processor(NULL), // will be set later _conc_workers(NULL), // may be set later _abort_preclean(false), _start_sampling(false), _between_prologue_and_epilogue(false), _markBitMap(0, Mutex::leaf + 1, "CMS_markBitMap_lock"), _modUnionTable((CardTable::card_shift - LogHeapWordSize), -1 /* lock-free */, "No_lock" /* dummy */), _modUnionClosurePar(&_modUnionTable), // Construct the is_alive_closure with _span & markBitMap _is_alive_closure(_span, &_markBitMap), _restart_addr(NULL), _overflow_list(NULL), _stats(cmsGen),
*** 3742,3752 **** _abort_preclean = true; } } } - size_t CMSCollector::preclean_work(bool clean_refs, bool clean_survivor) { assert(_collectorState == Precleaning || _collectorState == AbortablePreclean, "incorrect state"); ResourceMark rm; HandleMark hm; --- 3743,3752 ----
*** 3759,3769 **** // Do one pass of scrubbing the discovered reference lists // to remove any reference objects with strongly-reachable // referents. if (clean_refs) { CMSPrecleanRefsYieldClosure yield_cl(this); ! assert(rp->span().equals(_span), "Spans should be equal"); CMSKeepAliveClosure keep_alive(this, _span, &_markBitMap, &_markStack, true /* preclean */); CMSDrainMarkingStackClosure complete_trace(this, _span, &_markBitMap, &_markStack, &keep_alive, true /* preclean */); --- 3759,3769 ---- // Do one pass of scrubbing the discovered reference lists // to remove any reference objects with strongly-reachable // referents. if (clean_refs) { CMSPrecleanRefsYieldClosure yield_cl(this); ! assert(_span_based_discoverer.span().equals(_span), "Spans should be equal"); CMSKeepAliveClosure keep_alive(this, _span, &_markBitMap, &_markStack, true /* preclean */); CMSDrainMarkingStackClosure complete_trace(this, _span, &_markBitMap, &_markStack, &keep_alive, true /* preclean */);
*** 5151,5161 **** { CMSHeap* heap = CMSHeap::heap(); WorkGang* workers = heap->workers(); assert(workers != NULL, "Need parallel worker threads."); CMSRefProcTaskProxy rp_task(task, &_collector, ! _collector.ref_processor()->span(), _collector.markBitMap(), workers, _collector.task_queues()); workers->run_task(&rp_task); } --- 5151,5161 ---- { CMSHeap* heap = CMSHeap::heap(); WorkGang* workers = heap->workers(); assert(workers != NULL, "Need parallel worker threads."); CMSRefProcTaskProxy rp_task(task, &_collector, ! _collector.ref_processor_span(), _collector.markBitMap(), workers, _collector.task_queues()); workers->run_task(&rp_task); }
*** 5172,5182 **** void CMSCollector::refProcessingWork() { ResourceMark rm; HandleMark hm; ReferenceProcessor* rp = ref_processor(); ! assert(rp->span().equals(_span), "Spans should be equal"); assert(!rp->enqueuing_is_done(), "Enqueuing should not be complete"); // Process weak references. rp->setup_policy(false); verify_work_stacks_empty(); --- 5172,5182 ---- void CMSCollector::refProcessingWork() { ResourceMark rm; HandleMark hm; ReferenceProcessor* rp = ref_processor(); ! assert(_span_based_discoverer.span().equals(_span), "Spans should be equal"); assert(!rp->enqueuing_is_done(), "Enqueuing should not be complete"); // Process weak references. rp->setup_policy(false); verify_work_stacks_empty();
< prev index next >