A generic jni method can be instrumented.
Fixes tracing 119-noimage-patchoat test.
Change-Id: Ifc9709b714dbad6e087d327fdde7a008e5e731d3
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 3f17702..c1279bf 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -412,6 +412,13 @@
if (class_linker->IsQuickResolutionStub(existing_entry_point)) {
// We are running the generic jni stub, but the entry point of the method has not
// been updated yet.
+ DCHECK_EQ(pc, 0u) << "Should be a downcall";
+ DCHECK(IsNative());
+ return nullptr;
+ }
+ if (existing_entry_point == GetQuickInstrumentationEntryPoint()) {
+ // We are running the generic jni stub, but the method is being instrumented.
+ DCHECK_EQ(pc, 0u) << "Should be a downcall";
DCHECK(IsNative());
return nullptr;
}