Revert "Revert "Add support for booting with a boot classpath not fully AOTed.""
This reverts commit 14bfeddf2e434954f0ca36687ac0fc5dc6412bd3.
Reason for revert: Removes obsolete DCHECK
Bug: 119800099
Change-Id: Ia984f95300c6b96165f0179bfc2f66b012bf5dbe
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 96d6d2a..021d2cf 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -589,9 +589,12 @@
StackHandleScope<1> hs(Thread::Current());
Handle<mirror::ObjectArray<mirror::Class>> inline_cache;
- InlineCacheType inline_cache_type = Runtime::Current()->IsAotCompiler()
- ? GetInlineCacheAOT(caller_dex_file, invoke_instruction, &hs, &inline_cache)
- : GetInlineCacheJIT(invoke_instruction, &hs, &inline_cache);
+ // The Zygote JIT compiles based on a profile, so we shouldn't use runtime inline caches
+ // for it.
+ InlineCacheType inline_cache_type =
+ (Runtime::Current()->IsAotCompiler() || Runtime::Current()->IsZygote())
+ ? GetInlineCacheAOT(caller_dex_file, invoke_instruction, &hs, &inline_cache)
+ : GetInlineCacheJIT(invoke_instruction, &hs, &inline_cache);
switch (inline_cache_type) {
case kInlineCacheNoData: {
@@ -679,7 +682,6 @@
StackHandleScope<1>* hs,
/*out*/Handle<mirror::ObjectArray<mirror::Class>>* inline_cache)
REQUIRES_SHARED(Locks::mutator_lock_) {
- DCHECK(Runtime::Current()->IsAotCompiler());
const ProfileCompilationInfo* pci = codegen_->GetCompilerOptions().GetProfileCompilationInfo();
if (pci == nullptr) {
return kInlineCacheNoData;