diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-02-28 17:18:37 -0800 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-02-28 17:34:30 -0800 |
commit | 563b47cc142e477da244539b1d63070425e7fd78 (patch) | |
tree | 3da2bb5ccdcd16f7104211855d47ece3f1d24767 /runtime/instrumentation.cc | |
parent | e58d0203351d9740a8f74a140fdee342168e6552 (diff) | |
download | art-563b47cc142e477da244539b1d63070425e7fd78.zip art-563b47cc142e477da244539b1d63070425e7fd78.tar.gz art-563b47cc142e477da244539b1d63070425e7fd78.tar.bz2 |
Fix the bug that some compiled code was invoked with -Xint.
Some compiled code (probably static methods) is still being invoked
with -Xint. Added an assert to detect this case.
Bug: 13250375
Change-Id: Iecfe8ef40c6c326962593db78e6e1d9f1c93842e
Diffstat (limited to 'runtime/instrumentation.cc')
-rw-r--r-- | runtime/instrumentation.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc index 9d05169..01ad46d 100644 --- a/runtime/instrumentation.cc +++ b/runtime/instrumentation.cc @@ -80,9 +80,19 @@ static void UpdateEntrypoints(mirror::ArtMethod* method, const void* quick_code, method->ClearIsPortableCompiled(); } if (!method->IsResolutionMethod()) { - if (quick_code == GetQuickToInterpreterBridge()) { - DCHECK(portable_code == GetPortableToInterpreterBridge()); + if (quick_code == GetQuickToInterpreterBridge() || + (quick_code == GetQuickResolutionTrampoline(Runtime::Current()->GetClassLinker()) && + Runtime::Current()->GetInstrumentation()->IsForcedInterpretOnly() + && !method->IsNative() && !method->IsProxyMethod())) { + if (kIsDebugBuild) { + if (quick_code == GetQuickToInterpreterBridge()) { + DCHECK(portable_code == GetPortableToInterpreterBridge()); + } else if (quick_code == GetQuickResolutionTrampoline(Runtime::Current()->GetClassLinker())) { + DCHECK(portable_code == GetPortableResolutionTrampoline(Runtime::Current()->GetClassLinker())); + } + } DCHECK(!method->IsNative()) << PrettyMethod(method); + DCHECK(!method->IsProxyMethod()) << PrettyMethod(method); method->SetEntryPointFromInterpreter(art::interpreter::artInterpreterToInterpreterBridge); } else { method->SetEntryPointFromInterpreter(art::artInterpreterToCompiledCodeBridge); |