hotspot/src/share/vm/prims/jvmtiEnv.cpp
jvmtiError
JvmtiEnv::GenerateEvents(jvmtiEvent event_type) {
{- -------------------------------------------
(1) event_type 引数の値がおかしければ, JVMTI_ERROR_ILLEGAL_ARGUMENT エラーをリターン.
---------------------------------------- -}
// can only generate two event types
if (event_type != JVMTI_EVENT_COMPILED_METHOD_LOAD &&
event_type != JVMTI_EVENT_DYNAMIC_CODE_GENERATED) {
return JVMTI_ERROR_ILLEGAL_ARGUMENT;
}
{- -------------------------------------------
(1) event_type 引数に応じて以下のどちらかを呼び出し, 結果をリターンする.
* event_type 引数が JVMTI_EVENT_COMPILED_METHOD_LOAD の場合:
JvmtiCodeBlobEvents::generate_compiled_method_load_events()
(ただし, 対応する capability が無い場合は JVMTI_ERROR_MUST_POSSESS_CAPABILITY をリターンするだけ)
* event_type 引数が JVMTI_EVENT_DYNAMIC_CODE_GENERATED の場合:
JvmtiCodeBlobEvents::generate_dynamic_code_events()
---------------------------------------- -}
// for compiled_method_load events we must check that the environment
// has the can_generate_compiled_method_load_events capability.
if (event_type == JVMTI_EVENT_COMPILED_METHOD_LOAD) {
if (get_capabilities()->can_generate_compiled_method_load_events == 0) {
return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
}
return JvmtiCodeBlobEvents::generate_compiled_method_load_events(this);
} else {
return JvmtiCodeBlobEvents::generate_dynamic_code_events(this);
}
} /* end GenerateEvents */
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.