Up Top

Serviceability 機能 : JVMTI の処理 : JVMTI 関数の処理 : 監視されるフィールド (Watched Field) : SetFieldAccessWatch(), ClearFieldAccessWatch(), SetFieldModificationWatch(), ClearFieldModificationWatch() の処理


概要(Summary)

(See: JVMTI 仕様)

備考(Notes)

処理の流れ (概要)(Execution Flows : Summary)

watch point 関係の capability の有効化処理 (AddCapabilities() の処理)

(See: here for details)

なお watch point 用の capability を取得すると, (JvmtiExport::can_*() が変更されることに加えて) interp_only_mode 用に様々な最適化オプションが無効になる (See: here for details).

watch point 関係の callback の設定処理 (SetEventCallbacks() の処理)

(See: here for details)

watch point event の有効化処理 (SetEventNotificationMode() の処理)

(See: here for details)

監視対象の指定処理 (SetFieldAccessWatch(), ClearFieldAccessWatch(), SetFieldModificationWatch(), ClearFieldModificationWatch() の処理)

(処理の流れは4つともほぼ同じなので, 以下では JvmtiEnv::SetFieldAccessWatch() のみ記述)

JvmtiEnv::SetFieldAccessWatch()
-> JvmtiEventController::change_field_watch()
   -> JvmtiEventControllerPrivate::change_field_watch()
      -> JvmtiEventControllerPrivate::recompute_enabled()
         -> (略) (See: here for details)

watch point のフック処理

* Template Interpreter の場合:

  TemplateTable::getfield_or_static() もしくは TemplateTable::fast_accessfield() が生成するコード
  -> TemplateTable::jvmti_post_field_access() が生成するコード
     -> JvmtiExport::can_post_field_access()
     -> InterpreterRuntime::post_field_access()
        -> JvmtiExport::post_field_access()

  TemplateTable::putfield_or_static()
  -> TemplateTable::jvmti_post_field_mod() が生成するコード
     -> JvmtiExport::can_post_field_modification()
     -> InterpreterRuntime::post_field_modification()
        -> JvmtiExport::post_raw_field_modification()

  TemplateTable::fast_storefield()
  -> TemplateTable::jvmti_post_fast_field_mod() が生成するコード
     -> JvmtiExport::can_post_field_modification()
     -> InterpreterRuntime::post_field_modification()
        -> (同上)

* C++ Interpreter の場合:

  BytecodeInterpreter::run() もしくは BytecodeInterpreter::runWithChecks()
  -> InterpreterRuntime::post_field_access()
     -> (同上)

  BytecodeInterpreter::run() もしくは BytecodeInterpreter::runWithChecks()
  -> InterpreterRuntime::post_field_modification()
     -> (同上)

処理の流れ (詳細)(Execution Flows : Details)

JvmtiEnv::SetFieldAccessWatch()

See: here for details

fieldDescriptor::set_is_field_access_watched()

See: here for details

AccessFlags::set_is_field_access_watched()

See: here for details

JvmtiEnvBase::update_klass_field_access_flag()

See: here for details

JvmtiEventController::change_field_watch()

See: here for details

JvmtiEventControllerPrivate::change_field_watch()

See: here for details

JvmtiEnv::ClearFieldAccessWatch()

See: here for details

JvmtiEnv::SetFieldModificationWatch()

See: here for details

JvmtiEnv::ClearFieldModificationWatch()

See: here for details

TemplateTable::jvmti_post_field_access() (sparc の場合)

(#Under Construction)

TemplateTable::jvmti_post_field_access() (x86_64 の場合)

(#Under Construction)

JvmtiExport::can_post_field_access()

(#Under Construction)

InterpreterRuntime::post_field_access()

(#Under Construction)

JvmtiExport::post_field_access()

(#Under Construction)

TemplateTable::jvmti_post_field_mod() (sparc の場合)

(#Under Construction)

TemplateTable::jvmti_post_field_mod() (x86_64 の場合)

(#Under Construction)

JvmtiExport::can_post_field_modification()

(#Under Construction)

InterpreterRuntime::post_field_modification()

(#Under Construction)

JvmtiExport::post_raw_field_modification()

(#Under Construction)

TemplateTable::jvmti_post_fast_field_mod() (sparc の場合)

(#Under Construction)

TemplateTable::jvmti_post_fast_field_mod() (x86_64 の場合)

(#Under Construction)


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