diff options
author | Brian Orr <brianorr@google.com> | 2021-08-11 19:11:24 +0000 |
---|---|---|
committer | Brian Orr <brianorr@google.com> | 2021-08-11 19:11:24 +0000 |
commit | 1982ce69133cfa895d84cb50ef4caefc770f929c (patch) | |
tree | 833a2a4e84c9f679433df5109ceb2225e39d626e | |
parent | dbee66a0677c9cca067f3d7c73548234b2a28a59 (diff) | |
parent | 82a47b881709b7e7f5c7080bf6216a9e9bf8ff8b (diff) |
Merge SP1A.210811.001
Change-Id: If9365356e1769b9cf35e6c0d93324a254b04a53f
-rw-r--r-- | build/apex/Android.bp | 30 | ||||
-rw-r--r-- | dexoptanalyzer/Android.bp | 3 | ||||
-rw-r--r-- | odrefresh/Android.bp | 3 | ||||
-rw-r--r-- | profman/Android.bp | 3 | ||||
-rw-r--r-- | runtime/class_linker.cc | 16 |
5 files changed, 27 insertions, 28 deletions
diff --git a/build/apex/Android.bp b/build/apex/Android.bp index d5cf74c3b7..c5acc915d4 100644 --- a/build/apex/Android.bp +++ b/build/apex/Android.bp @@ -29,9 +29,9 @@ art_runtime_base_binaries_both = [ art_runtime_base_binaries_both_on_device_first_on_host = [ "dex2oat", ] -// - Base requirements (binaries for which a 32-bit version is preferred on device, but for which -// only the "first" (likely 64-bit) version is required on host). -art_runtime_base_binaries_prefer32_on_device_first_on_host = [ +// - Base requirements (binaries for which the "first" version is preferred on device +// (likely 64-bit) and on host). +art_runtime_base_binaries_first_on_device_first_on_host = [ "dexoptanalyzer", "odrefresh", "profman", @@ -87,9 +87,9 @@ bionic_binaries_both = [ "ziptool", ] -// - Debug variants (binaries for which a 32-bit version is preferred on device, but for which -// only the "first" (likely 64-bit) version is required on host). -art_runtime_debug_binaries_prefer32_on_device_first_on_host = [ +// - Debug variants (binaries for which the "first" version is preferred on device +// (likely 64-bit) and on host). +art_runtime_debug_binaries_first_on_device_first_on_host = [ "dexoptanalyzerd", "profmand", ] @@ -249,11 +249,9 @@ apex_defaults { binaries: art_runtime_base_binaries_both + art_runtime_base_binaries_both_on_device_first_on_host, }, - prefer32: { - binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host, - }, first: { - binaries: art_tools_common_binaries + + binaries: art_runtime_base_binaries_first_on_device_first_on_host + + art_tools_common_binaries + art_tools_device_only_binaries, }, }, @@ -292,11 +290,9 @@ apex_defaults { binaries: art_tools_debug_binaries_both + art_runtime_debug_binaries_both_on_device_first_on_host, }, - prefer32: { - binaries: art_runtime_debug_binaries_prefer32_on_device_first_on_host, - }, first: { - binaries: art_tools_debug_binaries + + binaries: art_runtime_debug_binaries_first_on_device_first_on_host + + art_tools_debug_binaries + art_tools_debug_device_only_binaries, }, }, @@ -395,9 +391,9 @@ art_apex_test_host { art_tools_debug_binaries_both, }, first: { - binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host + - art_runtime_base_binaries_both_on_device_first_on_host + - art_runtime_debug_binaries_prefer32_on_device_first_on_host + + binaries: art_runtime_base_binaries_both_on_device_first_on_host + + art_runtime_base_binaries_first_on_device_first_on_host + + art_runtime_debug_binaries_first_on_device_first_on_host + art_runtime_debug_binaries_both_on_device_first_on_host + art_tools_common_binaries + art_tools_debug_binaries + // Host APEX is always debug. diff --git a/dexoptanalyzer/Android.bp b/dexoptanalyzer/Android.bp index 8efaf28ddf..a66bd290fb 100644 --- a/dexoptanalyzer/Android.bp +++ b/dexoptanalyzer/Android.bp @@ -33,8 +33,7 @@ cc_defaults { target: { android: { - // Use the 32-bit version of dexoptanalyzer on devices. - compile_multilib: "prefer32", + compile_multilib: "first", }, }, diff --git a/odrefresh/Android.bp b/odrefresh/Android.bp index fae4231cbc..58c228bbda 100644 --- a/odrefresh/Android.bp +++ b/odrefresh/Android.bp @@ -50,8 +50,7 @@ cc_defaults { static_libs: ["libxml2"], target: { android: { - // Use the 32-bit version of odrefresh on devices. - compile_multilib: "prefer32", + compile_multilib: "first", }, host: { shared_libs: [ diff --git a/profman/Android.bp b/profman/Android.bp index 8cc3479205..917d79ab00 100644 --- a/profman/Android.bp +++ b/profman/Android.bp @@ -35,8 +35,7 @@ cc_defaults { target: { android: { - // Use the 32-bit version of profman on devices. - compile_multilib: "prefer32", + compile_multilib: "first", shared_libs: [ "libbase", ], diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 8b9e42a572..b9751ab965 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -9814,16 +9814,22 @@ void ClassLinker::SetEntryPointsForObsoleteMethod(ArtMethod* method) const { } void ClassLinker::DumpForSigQuit(std::ostream& os) { - ScopedObjectAccess soa(Thread::Current()); - ReaderMutexLock mu(soa.Self(), *Locks::classlinker_classes_lock_); + // Avoid a deadlock between a garbage collecting thread running a checkpoint, + // a thread holding the dex or classlinker lock and blocking on a condition variable for + // weak references access, and a thread blocking on the dex or classlinker lock and thus + // unable to run the checkpoint. + Thread* self = Thread::Current(); + ScopedObjectAccess soa(self); + gc::ScopedGCCriticalSection gcs(self, gc::kGcCauseClassLinker, gc::kCollectorTypeClassLinker); + ReaderMutexLock mu(self, *Locks::classlinker_classes_lock_); os << "Zygote loaded classes=" << NumZygoteClasses() << " post zygote classes=" << NumNonZygoteClasses() << "\n"; - ReaderMutexLock mu2(soa.Self(), *Locks::dex_lock_); + ReaderMutexLock mu2(self, *Locks::dex_lock_); os << "Dumping registered class loaders\n"; size_t class_loader_index = 0; for (const ClassLoaderData& class_loader : class_loaders_) { ObjPtr<mirror::ClassLoader> loader = - ObjPtr<mirror::ClassLoader>::DownCast(soa.Self()->DecodeJObject(class_loader.weak_root)); + ObjPtr<mirror::ClassLoader>::DownCast(self->DecodeJObject(class_loader.weak_root)); if (loader != nullptr) { os << "#" << class_loader_index++ << " " << loader->GetClass()->PrettyDescriptor() << ": ["; bool saw_one_dex_file = false; @@ -9842,7 +9848,7 @@ void ClassLinker::DumpForSigQuit(std::ostream& os) { size_t parent_index = 0; for (const ClassLoaderData& class_loader2 : class_loaders_) { ObjPtr<mirror::ClassLoader> loader2 = ObjPtr<mirror::ClassLoader>::DownCast( - soa.Self()->DecodeJObject(class_loader2.weak_root)); + self->DecodeJObject(class_loader2.weak_root)); if (loader2 == loader->GetParent()) { os << ", parent #" << parent_index; found_parent = true; |