OSDN Git Service

A generic jni method can be instrumented.
authorNicolas Geoffray <ngeoffray@google.com>
Fri, 30 Oct 2015 12:23:16 +0000 (12:23 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Fri, 30 Oct 2015 12:23:16 +0000 (12:23 +0000)
Fixes tracing 119-noimage-patchoat test.

Change-Id: Ifc9709b714dbad6e087d327fdde7a008e5e731d3

runtime/art_method.cc

index 3f17702..c1279bf 100644 (file)
@@ -412,6 +412,13 @@ const OatQuickMethodHeader* ArtMethod::GetOatQuickMethodHeader(uintptr_t pc) {
     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;
     }