456 _count_card_bitmaps(NULL),
457 _count_marked_bytes(NULL),
458 _completed_initialization(false) {
459
460 _markBitMap1.initialize(g1h->reserved_region(), prev_bitmap_storage);
461 _markBitMap2.initialize(g1h->reserved_region(), next_bitmap_storage);
462
463 // Create & start a ConcurrentMark thread.
464 _cmThread = new ConcurrentMarkThread(this);
465 assert(cmThread() != NULL, "CM Thread should have been created");
466 assert(cmThread()->cm() != NULL, "CM Thread should refer to this cm");
467 if (_cmThread->osthread() == NULL) {
468 vm_shutdown_during_initialization("Could not create ConcurrentMarkThread");
469 }
470
471 assert(CGC_lock != NULL, "Where's the CGC_lock?");
472 assert(_markBitMap1.covers(g1h->reserved_region()), "_markBitMap1 inconsistency");
473 assert(_markBitMap2.covers(g1h->reserved_region()), "_markBitMap2 inconsistency");
474
475 SATBMarkQueueSet& satb_qs = JavaThread::satb_mark_queue_set();
476 satb_qs.set_buffer_size(G1SATBBufferSize);
477
478 _root_regions.init(_g1h, this);
479
480 if (ConcGCThreads > ParallelGCThreads) {
481 warning("Can't have more ConcGCThreads (%u) "
482 "than ParallelGCThreads (%u).",
483 ConcGCThreads, ParallelGCThreads);
484 return;
485 }
486 if (!FLAG_IS_DEFAULT(ConcGCThreads) && ConcGCThreads > 0) {
487 // Note: ConcGCThreads has precedence over G1MarkingOverheadPercent
488 // if both are set
489 _sleep_factor = 0.0;
490 _marking_task_overhead = 1.0;
491 } else if (G1MarkingOverheadPercent > 0) {
492 // We will calculate the number of parallel marking threads based
493 // on a target overhead with respect to the soft real-time goal
494 double marking_overhead = (double) G1MarkingOverheadPercent / 100.0;
495 double overall_cm_overhead =
496 (double) MaxGCPauseMillis * marking_overhead /
|
456 _count_card_bitmaps(NULL),
457 _count_marked_bytes(NULL),
458 _completed_initialization(false) {
459
460 _markBitMap1.initialize(g1h->reserved_region(), prev_bitmap_storage);
461 _markBitMap2.initialize(g1h->reserved_region(), next_bitmap_storage);
462
463 // Create & start a ConcurrentMark thread.
464 _cmThread = new ConcurrentMarkThread(this);
465 assert(cmThread() != NULL, "CM Thread should have been created");
466 assert(cmThread()->cm() != NULL, "CM Thread should refer to this cm");
467 if (_cmThread->osthread() == NULL) {
468 vm_shutdown_during_initialization("Could not create ConcurrentMarkThread");
469 }
470
471 assert(CGC_lock != NULL, "Where's the CGC_lock?");
472 assert(_markBitMap1.covers(g1h->reserved_region()), "_markBitMap1 inconsistency");
473 assert(_markBitMap2.covers(g1h->reserved_region()), "_markBitMap2 inconsistency");
474
475 SATBMarkQueueSet& satb_qs = JavaThread::satb_mark_queue_set();
476 satb_qs.set_buffer_size(SATBBufferSize);
477
478 _root_regions.init(_g1h, this);
479
480 if (ConcGCThreads > ParallelGCThreads) {
481 warning("Can't have more ConcGCThreads (%u) "
482 "than ParallelGCThreads (%u).",
483 ConcGCThreads, ParallelGCThreads);
484 return;
485 }
486 if (!FLAG_IS_DEFAULT(ConcGCThreads) && ConcGCThreads > 0) {
487 // Note: ConcGCThreads has precedence over G1MarkingOverheadPercent
488 // if both are set
489 _sleep_factor = 0.0;
490 _marking_task_overhead = 1.0;
491 } else if (G1MarkingOverheadPercent > 0) {
492 // We will calculate the number of parallel marking threads based
493 // on a target overhead with respect to the soft real-time goal
494 double marking_overhead = (double) G1MarkingOverheadPercent / 100.0;
495 double overall_cm_overhead =
496 (double) MaxGCPauseMillis * marking_overhead /
|