hotspot/src/share/vm/prims/jvmtiEnv.cpp
// info_ptr - pre-checked for NULL
jvmtiError
JvmtiEnv::GetObjectMonitorUsage(jobject object, jvmtiMonitorUsage* info_ptr) {
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
JavaThread* calling_thread = JavaThread::current();
{- -------------------------------------------
(1) まず JvmtiEnvBase::get_object_monitor_usage() での取得を試みる.
---------------------------------------- -}
jvmtiError err = get_object_monitor_usage(calling_thread, object, info_ptr);
{- -------------------------------------------
(1) 対象のスレッドがサスペンドしていなかった場合(JVMTI_ERROR_THREAD_NOT_SUSPENDED エラーが返された場合)は
VM_GetObjectMonitorUsage による取得を行う.
---------------------------------------- -}
if (err == JVMTI_ERROR_THREAD_NOT_SUSPENDED) {
// Some of the critical threads were not suspended. go to a safepoint and try again
VM_GetObjectMonitorUsage op(this, calling_thread, object, info_ptr);
VMThread::execute(&op);
err = op.result();
}
{- -------------------------------------------
(1) リターン
---------------------------------------- -}
return err;
} /* end GetObjectMonitorUsage */
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.