src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp

Print this page

        

*** 49,59 **** int ConcurrentMarkSweepThread::_CMS_flag = CMS_nil; volatile jint ConcurrentMarkSweepThread::_pending_yields = 0; volatile jint ConcurrentMarkSweepThread::_pending_decrements = 0; ! volatile bool ConcurrentMarkSweepThread::_icms_enabled = false; volatile bool ConcurrentMarkSweepThread::_should_run = false; // When icms is enabled, the icms thread is stopped until explicitly // started. volatile bool ConcurrentMarkSweepThread::_should_stop = true; --- 49,59 ---- int ConcurrentMarkSweepThread::_CMS_flag = CMS_nil; volatile jint ConcurrentMarkSweepThread::_pending_yields = 0; volatile jint ConcurrentMarkSweepThread::_pending_decrements = 0; ! volatile jint ConcurrentMarkSweepThread::_icms_disabled = 0; volatile bool ConcurrentMarkSweepThread::_should_run = false; // When icms is enabled, the icms thread is stopped until explicitly // started. volatile bool ConcurrentMarkSweepThread::_should_stop = true;
*** 82,92 **** if (!DisableStartThread) { os::start_thread(this); } } _sltMonitor = SLT_lock; ! set_icms_enabled(CMSIncrementalMode); } void ConcurrentMarkSweepThread::run() { assert(this == cmst(), "just checking"); --- 82,92 ---- if (!DisableStartThread) { os::start_thread(this); } } _sltMonitor = SLT_lock; ! assert(!CMSIncrementalMode || icms_is_enabled(), "Error"); } void ConcurrentMarkSweepThread::run() { assert(this == cmst(), "just checking");
*** 339,353 **** } } void ConcurrentMarkSweepThread::icms_wait() { assert(UseConcMarkSweepGC && CMSIncrementalMode, "just checking"); ! if (_should_stop && icms_enabled()) { MutexLockerEx x(iCMS_lock, Mutex::_no_safepoint_check_flag); trace_state("pause_icms"); _collector->stats().stop_cms_timer(); ! while(!_should_run && icms_enabled()) { iCMS_lock->wait(Mutex::_no_safepoint_check_flag); } _collector->stats().start_cms_timer(); _should_stop = false; trace_state("pause_icms end"); --- 339,353 ---- } } void ConcurrentMarkSweepThread::icms_wait() { assert(UseConcMarkSweepGC && CMSIncrementalMode, "just checking"); ! if (_should_stop && icms_is_enabled()) { MutexLockerEx x(iCMS_lock, Mutex::_no_safepoint_check_flag); trace_state("pause_icms"); _collector->stats().stop_cms_timer(); ! while(!_should_run && icms_is_enabled()) { iCMS_lock->wait(Mutex::_no_safepoint_check_flag); } _collector->stats().start_cms_timer(); _should_stop = false; trace_state("pause_icms end");