< prev index next >

src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp

Print this page
rev 11935 : [mq]: 8165292-gc-task-logging-spams-log


3494   // readability. See 6445193.
3495   //
3496   // Tony 2006.06.29
3497   for (unsigned i = 0; i < CMSCoordinatorYieldSleepCount &&
3498                    ConcurrentMarkSweepThread::should_yield() &&
3499                    !CMSCollector::foregroundGCIsActive(); ++i) {
3500     os::sleep(Thread::current(), 1, false);
3501   }
3502 
3503   ConcurrentMarkSweepThread::synchronize(true);
3504   _bit_map_lock->lock_without_safepoint_check();
3505   _collector->startTimer();
3506 }
3507 
3508 bool CMSCollector::do_marking_mt() {
3509   assert(ConcGCThreads > 0 && conc_workers() != NULL, "precondition");
3510   uint num_workers = AdaptiveSizePolicy::calc_active_conc_workers(conc_workers()->total_workers(),
3511                                                                   conc_workers()->active_workers(),
3512                                                                   Threads::number_of_non_daemon_threads());
3513   num_workers = conc_workers()->update_active_workers(num_workers);

3514 
3515   CompactibleFreeListSpace* cms_space  = _cmsGen->cmsSpace();
3516 
3517   CMSConcMarkingTask tsk(this,
3518                          cms_space,
3519                          conc_workers(),
3520                          task_queues());
3521 
3522   // Since the actual number of workers we get may be different
3523   // from the number we requested above, do we need to do anything different
3524   // below? In particular, may be we need to subclass the SequantialSubTasksDone
3525   // class?? XXX
3526   cms_space ->initialize_sequential_subtasks_for_marking(num_workers);
3527 
3528   // Refs discovery is already non-atomic.
3529   assert(!ref_processor()->discovery_is_atomic(), "Should be non-atomic");
3530   assert(ref_processor()->discovery_is_mt(), "Discovery should be MT");
3531   conc_workers()->start_task(&tsk);
3532   while (tsk.yielded()) {
3533     tsk.coordinator_yield();




3494   // readability. See 6445193.
3495   //
3496   // Tony 2006.06.29
3497   for (unsigned i = 0; i < CMSCoordinatorYieldSleepCount &&
3498                    ConcurrentMarkSweepThread::should_yield() &&
3499                    !CMSCollector::foregroundGCIsActive(); ++i) {
3500     os::sleep(Thread::current(), 1, false);
3501   }
3502 
3503   ConcurrentMarkSweepThread::synchronize(true);
3504   _bit_map_lock->lock_without_safepoint_check();
3505   _collector->startTimer();
3506 }
3507 
3508 bool CMSCollector::do_marking_mt() {
3509   assert(ConcGCThreads > 0 && conc_workers() != NULL, "precondition");
3510   uint num_workers = AdaptiveSizePolicy::calc_active_conc_workers(conc_workers()->total_workers(),
3511                                                                   conc_workers()->active_workers(),
3512                                                                   Threads::number_of_non_daemon_threads());
3513   num_workers = conc_workers()->update_active_workers(num_workers);
3514   log_info(gc,task)("Using %u workers of %u for marking", num_workers, conc_workers()->total_workers());
3515 
3516   CompactibleFreeListSpace* cms_space  = _cmsGen->cmsSpace();
3517 
3518   CMSConcMarkingTask tsk(this,
3519                          cms_space,
3520                          conc_workers(),
3521                          task_queues());
3522 
3523   // Since the actual number of workers we get may be different
3524   // from the number we requested above, do we need to do anything different
3525   // below? In particular, may be we need to subclass the SequantialSubTasksDone
3526   // class?? XXX
3527   cms_space ->initialize_sequential_subtasks_for_marking(num_workers);
3528 
3529   // Refs discovery is already non-atomic.
3530   assert(!ref_processor()->discovery_is_atomic(), "Should be non-atomic");
3531   assert(ref_processor()->discovery_is_mt(), "Discovery should be MT");
3532   conc_workers()->start_task(&tsk);
3533   while (tsk.yielded()) {
3534     tsk.coordinator_yield();


< prev index next >