diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-02-26 18:28:07 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-02-26 18:49:38 -0800 |
commit | 28a35887033652f3c1344bc3f46f5a1368023996 (patch) | |
tree | 07a9c0f0fe6a3193933f1b3cc7623e7ca82b0023 /compiler/driver/compiler_driver.cc | |
parent | 0a575f25c56c8fff485a1dd497ed1efb1b5d3ea9 (diff) | |
download | android_art-28a35887033652f3c1344bc3f46f5a1368023996.tar.gz android_art-28a35887033652f3c1344bc3f46f5a1368023996.tar.bz2 android_art-28a35887033652f3c1344bc3f46f5a1368023996.zip |
Fix JIT direct call to interpreter bridge
FormulaEvaluationActions.EvaluateAndApplyChanges on hammerhead eng:
Before: 3550ms
After: 2540
Bug: 17950037
Change-Id: If7acaea20d4adb5418d00ef13192e2d4c29032af
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 15b3d08a37..90e63e9674 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -1316,6 +1316,14 @@ void CompilerDriver::GetCodeAndMethodForDirectCall(InvokeType* type, InvokeType } } } + if (runtime->UseJit()) { + // If we are the JIT, then don't allow a direct call to the interpreter bridge since this will + // never be updated even after we compile the method. + if (runtime->GetClassLinker()->IsQuickToInterpreterBridge( + reinterpret_cast<const void*>(compiler_->GetEntryPointOf(method)))) { + use_dex_cache = true; + } + } if (method_code_in_boot) { *stats_flags |= kFlagDirectCallToBoot | kFlagDirectMethodToBoot; } |