diff options
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r-- | compiler/optimizing/inliner.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 66a536d33b..37fa318403 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -674,9 +674,15 @@ HInliner::InlineCacheType HInliner::GetInlineCacheJIT( return kInlineCacheNoData; } - Runtime::Current()->GetJit()->GetCodeCache()->CopyInlineCacheInto( - *profiling_info->GetInlineCache(invoke_instruction->GetDexPc()), - classes); + InlineCache* cache = profiling_info->GetInlineCache(invoke_instruction->GetDexPc()); + if (cache == nullptr) { + // This shouldn't happen, but we don't guarantee that method resolution + // between baseline compilation and optimizing compilation is identical. Be robust, + // warn about it, and return that we don't have any inline cache data. + LOG(WARNING) << "No inline cache found for " << caller->PrettyMethod(); + return kInlineCacheNoData; + } + Runtime::Current()->GetJit()->GetCodeCache()->CopyInlineCacheInto(*cache, classes); return GetInlineCacheType(*classes); } |