(See: JVMTI 仕様)
フィールドの watch point 機能を利用するためには, これらの関数を呼び出すことに加えて, 通常のイベント通知設定処理(callback の設定,通知の有効化)も行っておく必要がある. (See: here for details)
watch point 機能を有効にした場合 interp_only_mode になる. (See: here for details)
watch point capability を取得した場合に true になる JvmtiExport::can_* フィールドは以下の通り. (#TODO)
(See: here for details)
なお watch point 用の capability を取得すると, (JvmtiExport::can_*() が変更されることに加えて) interp_only_mode 用に様々な最適化オプションが無効になる (See: here for details).
(See: here for details)
(See: here for details)
(処理の流れは4つともほぼ同じなので, 以下では JvmtiEnv::SetFieldAccessWatch() のみ記述)
JvmtiEnv::SetFieldAccessWatch()
-> JvmtiEventController::change_field_watch()
-> JvmtiEventControllerPrivate::change_field_watch()
-> JvmtiEventControllerPrivate::recompute_enabled()
-> (略) (See: here for details)
* 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()
-> (同上)
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
(#Under Construction)
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.