From b740438513307629491c575dbf895bbbf215f77c Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Wed, 2 Feb 2022 16:00:52 +0000 Subject: Revert^2 "Add bss support for inlining BCP DexFiles for single image" This reverts commit 239c449f10853374a9a7a2bd1d8413354054573e. Reason for revert: Fix in android-review.googlesource.com/c/1968661/1..3 Additionally, we are adding the runtime support for updating the .bss slots on android-review.googlesource.com/c/1968661/3..4. Since BCP the DexFiles will not have a corresponding OatDexFile, we can do a best-effort try to fetch the outer method's OatFile to update the bss slots at runtime. Bug: 154012332 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Test: Compile and open top 10 APKs with csuite locally Change-Id: Ifb2b152cee363c4674fc9273690c73f0406282ba --- compiler/optimizing/inliner.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/inliner.cc') diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 1df313d7fc..c6301c589e 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -1740,11 +1740,12 @@ static bool CanEncodeInlinedMethodInStackMap(const DexFile& outer_dex_file, // Inline across dexfiles if the callee's DexFile is: // 1) in the bootclasspath, or if (callee->GetDeclaringClass()->GetClassLoader() == nullptr) { - // There are cases in which the BCP DexFiles are within the OatFile as far as the compiler - // options are concerned, but they have their own OatWriter (and therefore not in the same - // OatFile). Then, we request the BSS check for all BCP DexFiles. - // TODO(solanes): Add .bss support for BCP. - *out_needs_bss_check = true; + // In multi-image, each BCP DexFile has their own OatWriter. Since they don't cooperate with + // each other, we request the BSS check for them. + // TODO(solanes): Add .bss support for BCP multi-image. + const bool is_multi_image = codegen->GetCompilerOptions().IsBootImage() || + codegen->GetCompilerOptions().IsBootImageExtension(); + *out_needs_bss_check = is_multi_image; return true; } -- cgit v1.2.3-59-g8ed1b