Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp

名前(function name)

void ConcurrentMarkThread::sleepBeforeNextCycle() {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      // We join here because we don't want to do the "shouldConcurrentMark()"
      // below while the world is otherwise stopped.
      assert(!in_progress(), "should have been cleared");

  {- -------------------------------------------
  (1) _started フィールドが true になるまでここで待機する.
      (起床させる処理は G1CollectedHeap::doConcurrentMark() で行われている.
       See: G1CollectedHeap::doConcurrentMark())

      (なお, 待機処理は CGC_lock に対して Monitor::wait() を呼ぶことで行う)
      ---------------------------------------- -}

      MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag);
      while (!started()) {
        CGC_lock->wait(Mutex::_no_safepoint_check_flag);
      }

  {- -------------------------------------------
  (1) ConcurrentMarkThread::set_in_progress() を呼んで, 
      _in_progress フィールドを true にセットしておく.
      ---------------------------------------- -}

      set_in_progress();

  {- -------------------------------------------
  (1) ConcurrentMarkThread::clear_started() を呼んで, 
      _started フィールドを false に戻しておく.
      ---------------------------------------- -}

      clear_started();
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.