Top


定義場所(file name)

hotspot/src/share/vm/prims/jvmtiEventController.cpp

名前(function name)

void
JvmtiEventController::set_event_callbacks(JvmtiEnvBase *env,
                                          const jvmtiEventCallbacks* callbacks,
                                          jint size_of_callbacks) {

本体部(body)

  {- -------------------------------------------
  (1) JvmtiEventControllerPrivate::set_event_callbacks() を呼び出す.

      (なお, HotSpot の起動中(= Threads::number_of_threads() が 0)であれば
       (他にスレッドがいないので) この呼び出し時に排他処理は必要ない.
       起動中でなければ, JvmtiThreadState_lock で排他した状態で呼び出す.)
      ---------------------------------------- -}

      if (Threads::number_of_threads() == 0) {
        // during early VM start-up locks don't exist, but we are safely single threaded,
        // call the functionality without holding the JvmtiThreadState_lock.
        JvmtiEventControllerPrivate::set_event_callbacks(env, callbacks, size_of_callbacks);
      } else {
        MutexLocker mu(JvmtiThreadState_lock);
        JvmtiEventControllerPrivate::set_event_callbacks(env, callbacks, size_of_callbacks);
      }
    }

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