Top


定義場所(file name)

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

説明(description)

// Generate a DYNAMIC_CODE_GENERATED event for each non-nmethod code blob.

名前(function name)

jvmtiError JvmtiCodeBlobEvents::generate_dynamic_code_events(JvmtiEnv* env) {

本体部(body)

  {- -------------------------------------------
  (1) CodeBlobCollector::collect() を呼び出し, 
      StubCode/CodeBlob の情報を CodeBlobCollector オブジェクト内に収集する.
      ---------------------------------------- -}

      CodeBlobCollector collector;

      // First collect all the code blobs.  This has to be done in a
      // single pass over the code cache with CodeCache_lock held because
      // there isn't any safe way to iterate over regular CodeBlobs since
      // they can be freed at any point.
      {
        MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
        collector.collect();
      }

  {- -------------------------------------------
  (1) 収集した各 StubCode/CodeBlob オブジェクトに対して 
      JvmtiExport::post_dynamic_code_generated() を呼び出し, 
      DYNAMIC_CODE_GENERATED イベントの生成を行う.
      ---------------------------------------- -}

      // iterate over the collected list and post an event for each blob
      JvmtiCodeBlobDesc* blob = collector.first();
      while (blob != NULL) {
        JvmtiExport::post_dynamic_code_generated(env, blob->name(), blob->code_begin(), blob->code_end());
        blob = collector.next();
      }

  {- -------------------------------------------
  (1) リターン
      ---------------------------------------- -}

      return JVMTI_ERROR_NONE;
    }

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