summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-10-30 12:23:16 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-10-30 12:23:16 +0000
commit703c282d1d53021de9dddf1d5c1318e70e81c7fc (patch)
treefe8b8a5ff9ddd98a4eb5d4496e1a18bd38de5598
parent70d95b4cabcabff7eda37e9e8348744891008e65 (diff)
A generic jni method can be instrumented.
Fixes tracing 119-noimage-patchoat test. Change-Id: Ifc9709b714dbad6e087d327fdde7a008e5e731d3
-rw-r--r--runtime/art_method.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 3f17702fa4..c1279bf6b1 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -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;
}