Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 751:20c6f43950b5
6490395: G1: Tidy up command line flags.
Summary: Change G1 flag names to be more consistent and disable some in 'product' mode.
Reviewed-by: tonyp, iveresov
author | johnc |
---|---|
date | Thu, 30 Apr 2009 15:07:53 -0700 |
parents | bd441136a5ce |
children | 830ca2573896 |
comparison
equal
deleted
inserted
replaced
748:51285b431bb2 | 751:20c6f43950b5 |
---|---|
446 | 446 |
447 if (verbose_low()) | 447 if (verbose_low()) |
448 gclog_or_tty->print_cr("[global] init, heap start = "PTR_FORMAT", " | 448 gclog_or_tty->print_cr("[global] init, heap start = "PTR_FORMAT", " |
449 "heap end = "PTR_FORMAT, _heap_start, _heap_end); | 449 "heap end = "PTR_FORMAT, _heap_start, _heap_end); |
450 | 450 |
451 _markStack.allocate(G1CMStackSize); | 451 _markStack.allocate(G1MarkStackSize); |
452 _regionStack.allocate(G1CMRegionStackSize); | 452 _regionStack.allocate(G1MarkRegionStackSize); |
453 | 453 |
454 // Create & start a ConcurrentMark thread. | 454 // Create & start a ConcurrentMark thread. |
455 if (G1ConcMark) { | 455 if (G1ConcMark) { |
456 _cmThread = new ConcurrentMarkThread(this); | 456 _cmThread = new ConcurrentMarkThread(this); |
457 assert(cmThread() != NULL, "CM Thread should have been created"); | 457 assert(cmThread() != NULL, "CM Thread should have been created"); |
497 _parallel_marking_threads = 0; | 497 _parallel_marking_threads = 0; |
498 _sleep_factor = 0.0; | 498 _sleep_factor = 0.0; |
499 _marking_task_overhead = 1.0; | 499 _marking_task_overhead = 1.0; |
500 } else { | 500 } else { |
501 if (ParallelMarkingThreads > 0) { | 501 if (ParallelMarkingThreads > 0) { |
502 // notice that ParallelMarkingThreads overwrites G1MarkingOverheadPerc | 502 // notice that ParallelMarkingThreads overwrites G1MarkingOverheadPercent |
503 // if both are set | 503 // if both are set |
504 | 504 |
505 _parallel_marking_threads = ParallelMarkingThreads; | 505 _parallel_marking_threads = ParallelMarkingThreads; |
506 _sleep_factor = 0.0; | 506 _sleep_factor = 0.0; |
507 _marking_task_overhead = 1.0; | 507 _marking_task_overhead = 1.0; |
508 } else if (G1MarkingOverheadPerc > 0) { | 508 } else if (G1MarkingOverheadPercent > 0) { |
509 // we will calculate the number of parallel marking threads | 509 // we will calculate the number of parallel marking threads |
510 // based on a target overhead with respect to the soft real-time | 510 // based on a target overhead with respect to the soft real-time |
511 // goal | 511 // goal |
512 | 512 |
513 double marking_overhead = (double) G1MarkingOverheadPerc / 100.0; | 513 double marking_overhead = (double) G1MarkingOverheadPercent / 100.0; |
514 double overall_cm_overhead = | 514 double overall_cm_overhead = |
515 (double) G1MaxPauseTimeMS * marking_overhead / (double) G1TimeSliceMS; | 515 (double) MaxGCPauseMillis * marking_overhead / |
516 (double) GCPauseIntervalMillis; | |
516 double cpu_ratio = 1.0 / (double) os::processor_count(); | 517 double cpu_ratio = 1.0 / (double) os::processor_count(); |
517 double marking_thread_num = ceil(overall_cm_overhead / cpu_ratio); | 518 double marking_thread_num = ceil(overall_cm_overhead / cpu_ratio); |
518 double marking_task_overhead = | 519 double marking_task_overhead = |
519 overall_cm_overhead / marking_thread_num * | 520 overall_cm_overhead / marking_thread_num * |
520 (double) os::processor_count(); | 521 (double) os::processor_count(); |
1745 // We need to make this be a "collection" so any collection pause that | 1746 // We need to make this be a "collection" so any collection pause that |
1746 // races with it goes around and waits for completeCleanup to finish. | 1747 // races with it goes around and waits for completeCleanup to finish. |
1747 g1h->increment_total_collections(); | 1748 g1h->increment_total_collections(); |
1748 | 1749 |
1749 #ifndef PRODUCT | 1750 #ifndef PRODUCT |
1750 if (G1VerifyConcMark) { | 1751 if (VerifyDuringGC) { |
1751 G1CollectedHeap::heap()->prepare_for_verify(); | 1752 G1CollectedHeap::heap()->prepare_for_verify(); |
1752 G1CollectedHeap::heap()->verify(true,false); | 1753 G1CollectedHeap::heap()->verify(true,false); |
1753 } | 1754 } |
1754 #endif | 1755 #endif |
1755 } | 1756 } |