Top


定義場所(file name)

hotspot/src/share/vm/runtime/biasedLocking.cpp

名前(function name)

void BiasedLocking::init() {

本体部(body)

  {- -------------------------------------------
  (1) BiasedLockingStartupDelay オプションの値に応じて, 以下のどちらかを行う.

      * BiasedLockingStartupDelay が 0 よりも大きい値の場合:
        EnableBiasedLockingTask を生成する.
      * そうでない場合: 
        この関数内で VM_EnableBiasedLocking により biased locking を有効化する.

      (なお, UseBiasedLocking オプションが指定されていない場合には (当たり前だが)何もしない)
      ---------------------------------------- -}

      // If biased locking is enabled, schedule a task to fire a few
      // seconds into the run which turns on biased locking for all
      // currently loaded classes as well as future ones. This is a
      // workaround for startup time regressions due to a large number of
      // safepoints being taken during VM startup for bias revocation.
      // Ideally we would have a lower cost for individual bias revocation
      // and not need a mechanism like this.
      if (UseBiasedLocking) {
        if (BiasedLockingStartupDelay > 0) {
          EnableBiasedLockingTask* task = new EnableBiasedLockingTask(BiasedLockingStartupDelay);
          task->enroll();
        } else {
          VM_EnableBiasedLocking op(false);
          VMThread::execute(&op);
        }
      }
    }

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