< prev index next >

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

Print this page
rev 52405 : [mq]: use_allocators


 389   _accum_task_vtime(NULL),
 390 
 391   _concurrent_workers(NULL),
 392   _num_concurrent_workers(0),
 393   _max_concurrent_workers(0),
 394 
 395   _region_mark_stats(NEW_C_HEAP_ARRAY(G1RegionMarkStats, _g1h->max_regions(), mtGC)),
 396   _top_at_rebuild_starts(NEW_C_HEAP_ARRAY(HeapWord*, _g1h->max_regions(), mtGC))
 397 {
 398   _mark_bitmap_1.initialize(g1h->reserved_region(), prev_bitmap_storage);
 399   _mark_bitmap_2.initialize(g1h->reserved_region(), next_bitmap_storage);
 400 
 401   // Create & start ConcurrentMark thread.
 402   _cm_thread = new G1ConcurrentMarkThread(this);
 403   if (_cm_thread->osthread() == NULL) {
 404     vm_shutdown_during_initialization("Could not create ConcurrentMarkThread");
 405   }
 406 
 407   assert(CGC_lock != NULL, "CGC_lock must be initialized");
 408 
 409   SATBMarkQueueSet& satb_qs = G1BarrierSet::satb_mark_queue_set();
 410   satb_qs.set_buffer_size(G1SATBBufferSize);
 411 
 412   _root_regions.init(_g1h->survivor(), this);
 413 
 414   if (FLAG_IS_DEFAULT(ConcGCThreads) || ConcGCThreads == 0) {
 415     // Calculate the number of concurrent worker threads by scaling
 416     // the number of parallel GC threads.
 417     uint marking_thread_num = scale_concurrent_worker_threads(ParallelGCThreads);
 418     FLAG_SET_ERGO(uint, ConcGCThreads, marking_thread_num);
 419   }
 420 
 421   assert(ConcGCThreads > 0, "ConcGCThreads have been set.");
 422   if (ConcGCThreads > ParallelGCThreads) {
 423     log_warning(gc)("More ConcGCThreads (%u) than ParallelGCThreads (%u).",
 424                     ConcGCThreads, ParallelGCThreads);
 425     return;
 426   }
 427 
 428   log_debug(gc)("ConcGCThreads: %u offset %u", ConcGCThreads, _worker_id_offset);
 429   log_debug(gc)("ParallelGCThreads: %u", ParallelGCThreads);
 430 
 431   _num_concurrent_workers = ConcGCThreads;




 389   _accum_task_vtime(NULL),
 390 
 391   _concurrent_workers(NULL),
 392   _num_concurrent_workers(0),
 393   _max_concurrent_workers(0),
 394 
 395   _region_mark_stats(NEW_C_HEAP_ARRAY(G1RegionMarkStats, _g1h->max_regions(), mtGC)),
 396   _top_at_rebuild_starts(NEW_C_HEAP_ARRAY(HeapWord*, _g1h->max_regions(), mtGC))
 397 {
 398   _mark_bitmap_1.initialize(g1h->reserved_region(), prev_bitmap_storage);
 399   _mark_bitmap_2.initialize(g1h->reserved_region(), next_bitmap_storage);
 400 
 401   // Create & start ConcurrentMark thread.
 402   _cm_thread = new G1ConcurrentMarkThread(this);
 403   if (_cm_thread->osthread() == NULL) {
 404     vm_shutdown_during_initialization("Could not create ConcurrentMarkThread");
 405   }
 406 
 407   assert(CGC_lock != NULL, "CGC_lock must be initialized");
 408 



 409   _root_regions.init(_g1h->survivor(), this);
 410 
 411   if (FLAG_IS_DEFAULT(ConcGCThreads) || ConcGCThreads == 0) {
 412     // Calculate the number of concurrent worker threads by scaling
 413     // the number of parallel GC threads.
 414     uint marking_thread_num = scale_concurrent_worker_threads(ParallelGCThreads);
 415     FLAG_SET_ERGO(uint, ConcGCThreads, marking_thread_num);
 416   }
 417 
 418   assert(ConcGCThreads > 0, "ConcGCThreads have been set.");
 419   if (ConcGCThreads > ParallelGCThreads) {
 420     log_warning(gc)("More ConcGCThreads (%u) than ParallelGCThreads (%u).",
 421                     ConcGCThreads, ParallelGCThreads);
 422     return;
 423   }
 424 
 425   log_debug(gc)("ConcGCThreads: %u offset %u", ConcGCThreads, _worker_id_offset);
 426   log_debug(gc)("ParallelGCThreads: %u", ParallelGCThreads);
 427 
 428   _num_concurrent_workers = ConcGCThreads;


< prev index next >