summaryrefslogtreecommitdiffstats
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-02-25 13:22:57 -0800
committerMathieu Chartier <mathieuc@google.com>2015-02-25 15:03:03 -0800
commitc0d5f89d99c55ab63d6757fbd71dbfe95d347c1f (patch)
treedbee9449a109e88237205a68aba9f445d7e3e91d /runtime/class_linker.cc
parent8db3d76ba7061da80f5eb58079830c796e4dea61 (diff)
downloadandroid_art-c0d5f89d99c55ab63d6757fbd71dbfe95d347c1f.tar.gz
android_art-c0d5f89d99c55ab63d6757fbd71dbfe95d347c1f.tar.bz2
android_art-c0d5f89d99c55ab63d6757fbd71dbfe95d347c1f.zip
Fix JIT for vmdebug test 99
Test was flaky due to JIT re-compiliation after deoptimization resulting in some invalid PC offsets. Bug: 17950037 Change-Id: I276c84c918579259ce47ef873892c3c5dcf0c977
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index f28253acf6..ee5eefbc45 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2520,16 +2520,16 @@ const void* ClassLinker::GetQuickOatCodeFor(mirror::ArtMethod* method) {
return GetQuickProxyInvokeHandler();
}
bool found;
- jit::Jit* const jit = Runtime::Current()->GetJit();
- if (jit != nullptr) {
- auto* code = jit->GetCodeCache()->GetCodeFor(method);
+ OatFile::OatMethod oat_method = FindOatMethodFor(method, &found);
+ if (found) {
+ auto* code = oat_method.GetQuickCode();
if (code != nullptr) {
return code;
}
}
- OatFile::OatMethod oat_method = FindOatMethodFor(method, &found);
- if (found) {
- auto* code = oat_method.GetQuickCode();
+ jit::Jit* const jit = Runtime::Current()->GetJit();
+ if (jit != nullptr) {
+ auto* code = jit->GetCodeCache()->GetCodeFor(method);
if (code != nullptr) {
return code;
}
@@ -2545,6 +2545,11 @@ const void* ClassLinker::GetOatMethodQuickCodeFor(mirror::ArtMethod* method) {
if (method->IsNative() || method->IsAbstract() || method->IsProxyMethod()) {
return nullptr;
}
+ bool found;
+ OatFile::OatMethod oat_method = FindOatMethodFor(method, &found);
+ if (found) {
+ return oat_method.GetQuickCode();
+ }
jit::Jit* jit = Runtime::Current()->GetJit();
if (jit != nullptr) {
auto* code = jit->GetCodeCache()->GetCodeFor(method);
@@ -2552,11 +2557,6 @@ const void* ClassLinker::GetOatMethodQuickCodeFor(mirror::ArtMethod* method) {
return code;
}
}
- bool found;
- OatFile::OatMethod oat_method = FindOatMethodFor(method, &found);
- if (found) {
- return oat_method.GetQuickCode();
- }
return nullptr;
}