summaryrefslogtreecommitdiff
path: root/openjdkjvmti/ti_method.cc
diff options
context:
space:
mode:
Diffstat (limited to 'openjdkjvmti/ti_method.cc')
-rw-r--r--openjdkjvmti/ti_method.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/openjdkjvmti/ti_method.cc b/openjdkjvmti/ti_method.cc
index d8ee981063..defcd54082 100644
--- a/openjdkjvmti/ti_method.cc
+++ b/openjdkjvmti/ti_method.cc
@@ -93,12 +93,13 @@ struct TiMethodCallback : public art::MethodCallback {
ScopedLocalRef<jthread> thread_jni(
jnienv, PhaseUtil::IsLivePhase() ? jnienv->AddLocalReference<jthread>(thread->GetPeer())
: nullptr);
+ jmethodID method_id = art::jni::EncodeArtMethod(method);
art::ScopedThreadSuspension sts(thread, art::ThreadState::kNative);
event_handler->DispatchEvent<ArtJvmtiEvent::kNativeMethodBind>(
thread,
static_cast<JNIEnv*>(jnienv),
thread_jni.get(),
- art::jni::EncodeArtMethod(method),
+ method_id,
const_cast<void*>(cur_method),
new_method);
}