283 }
284
285 void CMSCollector::ref_processor_init() {
286 if (_ref_processor == NULL) {
287 // Allocate and initialize a reference processor
288 _ref_processor =
289 new ReferenceProcessor(_span, // span
290 (ParallelGCThreads > 1) && ParallelRefProcEnabled, // mt processing
291 ParallelGCThreads, // mt processing degree
292 _cmsGen->refs_discovery_is_mt(), // mt discovery
293 MAX2(ConcGCThreads, ParallelGCThreads), // mt discovery degree
294 _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic
295 &_is_alive_closure); // closure for liveness info
296 // Initialize the _ref_processor field of CMSGen
297 _cmsGen->set_ref_processor(_ref_processor);
298
299 }
300 }
301
302 AdaptiveSizePolicy* CMSCollector::size_policy() {
303 CMSHeap* heap = CMSHeap::heap();
304 return heap->gen_policy()->size_policy();
305 }
306
307 void ConcurrentMarkSweepGeneration::initialize_performance_counters() {
308
309 const char* gen_name = "old";
310 GenCollectorPolicy* gcp = CMSHeap::heap()->gen_policy();
311 // Generation Counters - generation 1, 1 subspace
312 _gen_counters = new GenerationCounters(gen_name, 1, 1,
313 gcp->min_old_size(), gcp->max_old_size(), &_virtual_space);
314
315 _space_counters = new GSpaceCounters(gen_name, 0,
316 _virtual_space.reserved_size(),
317 this, _gen_counters);
318 }
319
320 CMSStats::CMSStats(ConcurrentMarkSweepGeneration* cms_gen, unsigned int alpha):
321 _cms_gen(cms_gen)
322 {
323 assert(alpha <= 100, "bad value");
324 _saved_alpha = alpha;
|
283 }
284
285 void CMSCollector::ref_processor_init() {
286 if (_ref_processor == NULL) {
287 // Allocate and initialize a reference processor
288 _ref_processor =
289 new ReferenceProcessor(_span, // span
290 (ParallelGCThreads > 1) && ParallelRefProcEnabled, // mt processing
291 ParallelGCThreads, // mt processing degree
292 _cmsGen->refs_discovery_is_mt(), // mt discovery
293 MAX2(ConcGCThreads, ParallelGCThreads), // mt discovery degree
294 _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic
295 &_is_alive_closure); // closure for liveness info
296 // Initialize the _ref_processor field of CMSGen
297 _cmsGen->set_ref_processor(_ref_processor);
298
299 }
300 }
301
302 AdaptiveSizePolicy* CMSCollector::size_policy() {
303 return CMSHeap::heap()->size_policy();
304 }
305
306 void ConcurrentMarkSweepGeneration::initialize_performance_counters() {
307
308 const char* gen_name = "old";
309 GenCollectorPolicy* gcp = CMSHeap::heap()->gen_policy();
310 // Generation Counters - generation 1, 1 subspace
311 _gen_counters = new GenerationCounters(gen_name, 1, 1,
312 gcp->min_old_size(), gcp->max_old_size(), &_virtual_space);
313
314 _space_counters = new GSpaceCounters(gen_name, 0,
315 _virtual_space.reserved_size(),
316 this, _gen_counters);
317 }
318
319 CMSStats::CMSStats(ConcurrentMarkSweepGeneration* cms_gen, unsigned int alpha):
320 _cms_gen(cms_gen)
321 {
322 assert(alpha <= 100, "bad value");
323 _saved_alpha = alpha;
|