Top


定義場所(file name)

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

名前(function name)

void ConcurrentG1RefineThread::deactivate() {

本体部(body)

  {- -------------------------------------------
  (1) ConcurrentG1RefineThread::set_active() を呼んで _active フィールドを false に変えるだけ.
      (ただし, worker_id が 0 版の ConcurrentG1RefineThread の場合だけは, 
       ConcurrentG1RefineThread::set_active() の代わりに
       PtrQueueSet::set_process_completed() を呼んで, 
       DirtyCardQueueSet の _process_completed フィールドを変更する.)

      (See: ConcurrentG1RefineThread::is_active())
      ---------------------------------------- -}

      MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag);
      if (_worker_id > 0) {
        if (G1TraceConcRefinement) {
          DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
          gclog_or_tty->print_cr("G1-Refine-deactivated worker %d, off threshold %d, current %d",
                                 _worker_id, _deactivation_threshold, (int)dcqs.completed_buffers_num());
        }
        set_active(false);
      } else {
        DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
        dcqs.set_process_completed(false);
      }
    }

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