< prev index next >

src/share/vm/gc/g1/concurrentMark.cpp

Print this page




 619   assert(ConcGCThreads > 0, "Should have been set");
 620   _parallel_marking_threads = (uint) ConcGCThreads;
 621   _max_parallel_marking_threads = _parallel_marking_threads;
 622 
 623   if (parallel_marking_threads() > 1) {
 624     _cleanup_task_overhead = 1.0;
 625   } else {
 626     _cleanup_task_overhead = marking_task_overhead();
 627   }
 628   _cleanup_sleep_factor =
 629                    (1.0 - cleanup_task_overhead()) / cleanup_task_overhead();
 630 
 631 #if 0
 632   gclog_or_tty->print_cr("Marking Threads          %d", parallel_marking_threads());
 633   gclog_or_tty->print_cr("CM Marking Task Overhead %1.4lf", marking_task_overhead());
 634   gclog_or_tty->print_cr("CM Sleep Factor          %1.4lf", sleep_factor());
 635   gclog_or_tty->print_cr("CL Marking Task Overhead %1.4lf", cleanup_task_overhead());
 636   gclog_or_tty->print_cr("CL Sleep Factor          %1.4lf", cleanup_sleep_factor());
 637 #endif
 638 
 639   _parallel_workers = new FlexibleWorkGang("G1 Marker",
 640        _max_parallel_marking_threads, false, true);
 641   if (_parallel_workers == NULL) {
 642     vm_exit_during_initialization("Failed necessary allocation.");
 643   } else {
 644     _parallel_workers->initialize_workers();
 645   }
 646 
 647   if (FLAG_IS_DEFAULT(MarkStackSize)) {
 648     size_t mark_stack_size =
 649       MIN2(MarkStackSizeMax,
 650           MAX2(MarkStackSize, (size_t) (parallel_marking_threads() * TASKQUEUE_SIZE)));
 651     // Verify that the calculated value for MarkStackSize is in range.
 652     // It would be nice to use the private utility routine from Arguments.
 653     if (!(mark_stack_size >= 1 && mark_stack_size <= MarkStackSizeMax)) {
 654       warning("Invalid value calculated for MarkStackSize (" SIZE_FORMAT "): "
 655               "must be between 1 and " SIZE_FORMAT,
 656               mark_stack_size, MarkStackSizeMax);
 657       return;
 658     }
 659     FLAG_SET_ERGO(size_t, MarkStackSize, mark_stack_size);




 619   assert(ConcGCThreads > 0, "Should have been set");
 620   _parallel_marking_threads = (uint) ConcGCThreads;
 621   _max_parallel_marking_threads = _parallel_marking_threads;
 622 
 623   if (parallel_marking_threads() > 1) {
 624     _cleanup_task_overhead = 1.0;
 625   } else {
 626     _cleanup_task_overhead = marking_task_overhead();
 627   }
 628   _cleanup_sleep_factor =
 629                    (1.0 - cleanup_task_overhead()) / cleanup_task_overhead();
 630 
 631 #if 0
 632   gclog_or_tty->print_cr("Marking Threads          %d", parallel_marking_threads());
 633   gclog_or_tty->print_cr("CM Marking Task Overhead %1.4lf", marking_task_overhead());
 634   gclog_or_tty->print_cr("CM Sleep Factor          %1.4lf", sleep_factor());
 635   gclog_or_tty->print_cr("CL Marking Task Overhead %1.4lf", cleanup_task_overhead());
 636   gclog_or_tty->print_cr("CL Sleep Factor          %1.4lf", cleanup_sleep_factor());
 637 #endif
 638 
 639   _parallel_workers = new WorkGang("G1 Marker",
 640        _max_parallel_marking_threads, false, true);
 641   if (_parallel_workers == NULL) {
 642     vm_exit_during_initialization("Failed necessary allocation.");
 643   } else {
 644     _parallel_workers->initialize_workers();
 645   }
 646 
 647   if (FLAG_IS_DEFAULT(MarkStackSize)) {
 648     size_t mark_stack_size =
 649       MIN2(MarkStackSizeMax,
 650           MAX2(MarkStackSize, (size_t) (parallel_marking_threads() * TASKQUEUE_SIZE)));
 651     // Verify that the calculated value for MarkStackSize is in range.
 652     // It would be nice to use the private utility routine from Arguments.
 653     if (!(mark_stack_size >= 1 && mark_stack_size <= MarkStackSizeMax)) {
 654       warning("Invalid value calculated for MarkStackSize (" SIZE_FORMAT "): "
 655               "must be between 1 and " SIZE_FORMAT,
 656               mark_stack_size, MarkStackSizeMax);
 657       return;
 658     }
 659     FLAG_SET_ERGO(size_t, MarkStackSize, mark_stack_size);


< prev index next >