summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Hao <jeffhao@google.com> 2013-07-03 15:42:17 -0700
committer Jeff Hao <jeffhao@google.com> 2013-07-03 15:47:07 -0700
commitf3e861db83eec398c49e003fc323b7964fca6e50 (patch)
treebf612abb7a9b1bce6c3e056fd382694e33d5d778
parent5f10000a4515b5d828a1182fd8d34367af496861 (diff)
Fix GetQuickCodeFor to return actual code pointer if it exists.
If the compiled entry point is the interpreter entry point, the code now tries to get oat code for it before returning. Change-Id: Iea1cec1ed003aadd71b432cc405fc81509bc644a
-rw-r--r--src/instrumentation.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/instrumentation.cc b/src/instrumentation.cc
index f36cb8cd7c..8598d6d4f8 100644
--- a/src/instrumentation.cc
+++ b/src/instrumentation.cc
@@ -384,7 +384,8 @@ const void* Instrumentation::GetQuickCodeFor(const mirror::AbstractMethod* metho
if (LIKELY(!instrumentation_stubs_installed_)) {
const void* code = method->GetEntryPointFromCompiledCode();
DCHECK(code != NULL);
- if (LIKELY(code != GetResolutionTrampoline(runtime->GetClassLinker()))) {
+ if (LIKELY(code != GetResolutionTrampoline(runtime->GetClassLinker()) &&
+ code != GetInterpreterEntryPoint())) {
return code;
}
}