294 (double)(tr * MinHeapFreeRatio) / 100.0)
295 / 100.0;
296 }
297 }
298
299 void ConcurrentMarkSweepGeneration::ref_processor_init() {
300 assert(collector() != NULL, "no collector");
301 collector()->ref_processor_init();
302 }
303
304 void CMSCollector::ref_processor_init() {
305 if (_ref_processor == NULL) {
306 // Allocate and initialize a reference processor
307 _ref_processor =
308 new ReferenceProcessor(_span, // span
309 (ParallelGCThreads > 1) && ParallelRefProcEnabled, // mt processing
310 (int) ParallelGCThreads, // mt processing degree
311 _cmsGen->refs_discovery_is_mt(), // mt discovery
312 (int) MAX2(ConcGCThreads, ParallelGCThreads), // mt discovery degree
313 _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic
314 &_is_alive_closure, // closure for liveness info
315 false); // next field updates do not need write barrier
316 // Initialize the _ref_processor field of CMSGen
317 _cmsGen->set_ref_processor(_ref_processor);
318
319 }
320 }
321
322 CMSAdaptiveSizePolicy* CMSCollector::size_policy() {
323 GenCollectedHeap* gch = GenCollectedHeap::heap();
324 assert(gch->kind() == CollectedHeap::GenCollectedHeap,
325 "Wrong type of heap");
326 CMSAdaptiveSizePolicy* sp = (CMSAdaptiveSizePolicy*)
327 gch->gen_policy()->size_policy();
328 assert(sp->is_gc_cms_adaptive_size_policy(),
329 "Wrong type of size policy");
330 return sp;
331 }
332
333 CMSGCAdaptivePolicyCounters* CMSCollector::gc_adaptive_policy_counters() {
334 CMSGCAdaptivePolicyCounters* results =
335 (CMSGCAdaptivePolicyCounters*) collector_policy()->counters();
|
294 (double)(tr * MinHeapFreeRatio) / 100.0)
295 / 100.0;
296 }
297 }
298
299 void ConcurrentMarkSweepGeneration::ref_processor_init() {
300 assert(collector() != NULL, "no collector");
301 collector()->ref_processor_init();
302 }
303
304 void CMSCollector::ref_processor_init() {
305 if (_ref_processor == NULL) {
306 // Allocate and initialize a reference processor
307 _ref_processor =
308 new ReferenceProcessor(_span, // span
309 (ParallelGCThreads > 1) && ParallelRefProcEnabled, // mt processing
310 (int) ParallelGCThreads, // mt processing degree
311 _cmsGen->refs_discovery_is_mt(), // mt discovery
312 (int) MAX2(ConcGCThreads, ParallelGCThreads), // mt discovery degree
313 _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic
314 &_is_alive_closure); // closure for liveness info
315 // Initialize the _ref_processor field of CMSGen
316 _cmsGen->set_ref_processor(_ref_processor);
317
318 }
319 }
320
321 CMSAdaptiveSizePolicy* CMSCollector::size_policy() {
322 GenCollectedHeap* gch = GenCollectedHeap::heap();
323 assert(gch->kind() == CollectedHeap::GenCollectedHeap,
324 "Wrong type of heap");
325 CMSAdaptiveSizePolicy* sp = (CMSAdaptiveSizePolicy*)
326 gch->gen_policy()->size_policy();
327 assert(sp->is_gc_cms_adaptive_size_policy(),
328 "Wrong type of size policy");
329 return sp;
330 }
331
332 CMSGCAdaptivePolicyCounters* CMSCollector::gc_adaptive_policy_counters() {
333 CMSGCAdaptivePolicyCounters* results =
334 (CMSGCAdaptivePolicyCounters*) collector_policy()->counters();
|