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 --- runtime/entrypoints/entrypoint_utils.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'runtime/entrypoints/entrypoint_utils.h') diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h index 5faf387093..8b6fc69bea 100644 --- a/runtime/entrypoints/entrypoint_utils.h +++ b/runtime/entrypoints/entrypoint_utils.h @@ -213,9 +213,14 @@ bool NeedsClinitCheckBeforeCall(ArtMethod* method) REQUIRES_SHARED(Locks::mutato ObjPtr GetGenericJniSynchronizationObject(Thread* self, ArtMethod* called) REQUIRES_SHARED(Locks::mutator_lock_); -// Update .bss method entrypoint if the `callee_reference` has an associated oat file -// and that oat file has a .bss entry for the `callee_reference`. -void MaybeUpdateBssMethodEntry(ArtMethod* callee, MethodReference callee_reference); +// Update .bss method entrypoint if the `outer_method` has a valid OatFile, and either +// A) the `callee_reference` has the same OatFile as `outer_method`, or +// B) the `callee_reference` comes from a BCP DexFile that was present during `outer_method`'s +// OatFile compilation. +// In both cases, we require that the oat file has a .bss entry for the `callee_reference`. +void MaybeUpdateBssMethodEntry(ArtMethod* callee, + MethodReference callee_reference, + ArtMethod* outer_method) REQUIRES_SHARED(Locks::mutator_lock_); } // namespace art -- cgit v1.2.3-59-g8ed1b