Loading libs/binder/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ cc_defaults { "-Wreorder-init-list", "-Wunused-const-variable", "-Wunused-result", "-Wexit-time-destructors", "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", // Hide symbols by default and set the BUILDING_LIBBINDER macro so that Loading Loading @@ -469,7 +470,6 @@ release_libbinder_binder_observer_config { }, } soong_config_module_type { name: "libbinder_remove_cache_static_list_config", module_type: "cc_defaults", Loading libs/binder/Binder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ status_t BBinder::stopRecordingTransactions() { const String16& BBinder::getInterfaceDescriptor() const { static StaticString16 sBBinder(u"BBinder"); [[clang::no_destroy]] static StaticString16 sBBinder(u"BBinder"); ALOGW("Reached BBinder::getInterfaceDescriptor (this=%p). Override?", this); return sBBinder; } Loading libs/binder/BpBinder.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -40,16 +40,16 @@ using android::binder::unique_fd; // --------------------------------------------------------------------------- RpcMutex BpBinder::sTrackingLock; std::unordered_map<int32_t, uint32_t> BpBinder::sTrackingMap; std::unordered_map<int32_t, uint32_t> BpBinder::sLastLimitCallbackMap; [[clang::no_destroy]] RpcMutex BpBinder::sTrackingLock; [[clang::no_destroy]] std::unordered_map<int32_t, uint32_t> BpBinder::sTrackingMap; [[clang::no_destroy]] std::unordered_map<int32_t, uint32_t> BpBinder::sLastLimitCallbackMap; int BpBinder::sNumTrackedUids = 0; std::atomic_bool BpBinder::sCountByUidEnabled(false); binder_proxy_limit_callback BpBinder::sLimitCallback; binder_proxy_warning_callback BpBinder::sWarningCallback; [[clang::no_destroy]] binder_proxy_limit_callback BpBinder::sLimitCallback; [[clang::no_destroy]] binder_proxy_warning_callback BpBinder::sWarningCallback; bool BpBinder::sBinderProxyThrottleCreate = false; static StaticString16 kDescriptorUninit(u""); [[clang::no_destroy]] static StaticString16 kDescriptorUninit(u""); // Arbitrarily high value that probably distinguishes a bad behaving app uint32_t BpBinder::sBinderProxyCountHighWatermark = 2500; Loading libs/binder/BufferedTextOutput.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -258,7 +258,10 @@ void BufferedTextOutput::popBundle() BufferedTextOutput::BufferState* BufferedTextOutput::getBuffer() const { if ((mFlags&MULTITHREADED) != 0) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wexit-time-destructors" thread_local ThreadState ts; #pragma clang diagnostic pop while (ts.states.size() <= (size_t)mIndex) ts.states.add(nullptr); BufferState* bs = ts.states[mIndex].get(); if (bs != nullptr && bs->seq == mSeq) return bs; Loading libs/binder/IMemory.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ private: // TODO: Reimplemement based on standard C++ container? }; static sp<HeapCache> gHeapCache = sp<HeapCache>::make(); [[clang::no_destroy]] static sp<HeapCache> gHeapCache = sp<HeapCache>::make(); /******************************************************************************/ Loading Loading
libs/binder/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ cc_defaults { "-Wreorder-init-list", "-Wunused-const-variable", "-Wunused-result", "-Wexit-time-destructors", "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", // Hide symbols by default and set the BUILDING_LIBBINDER macro so that Loading Loading @@ -469,7 +470,6 @@ release_libbinder_binder_observer_config { }, } soong_config_module_type { name: "libbinder_remove_cache_static_list_config", module_type: "cc_defaults", Loading
libs/binder/Binder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ status_t BBinder::stopRecordingTransactions() { const String16& BBinder::getInterfaceDescriptor() const { static StaticString16 sBBinder(u"BBinder"); [[clang::no_destroy]] static StaticString16 sBBinder(u"BBinder"); ALOGW("Reached BBinder::getInterfaceDescriptor (this=%p). Override?", this); return sBBinder; } Loading
libs/binder/BpBinder.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -40,16 +40,16 @@ using android::binder::unique_fd; // --------------------------------------------------------------------------- RpcMutex BpBinder::sTrackingLock; std::unordered_map<int32_t, uint32_t> BpBinder::sTrackingMap; std::unordered_map<int32_t, uint32_t> BpBinder::sLastLimitCallbackMap; [[clang::no_destroy]] RpcMutex BpBinder::sTrackingLock; [[clang::no_destroy]] std::unordered_map<int32_t, uint32_t> BpBinder::sTrackingMap; [[clang::no_destroy]] std::unordered_map<int32_t, uint32_t> BpBinder::sLastLimitCallbackMap; int BpBinder::sNumTrackedUids = 0; std::atomic_bool BpBinder::sCountByUidEnabled(false); binder_proxy_limit_callback BpBinder::sLimitCallback; binder_proxy_warning_callback BpBinder::sWarningCallback; [[clang::no_destroy]] binder_proxy_limit_callback BpBinder::sLimitCallback; [[clang::no_destroy]] binder_proxy_warning_callback BpBinder::sWarningCallback; bool BpBinder::sBinderProxyThrottleCreate = false; static StaticString16 kDescriptorUninit(u""); [[clang::no_destroy]] static StaticString16 kDescriptorUninit(u""); // Arbitrarily high value that probably distinguishes a bad behaving app uint32_t BpBinder::sBinderProxyCountHighWatermark = 2500; Loading
libs/binder/BufferedTextOutput.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -258,7 +258,10 @@ void BufferedTextOutput::popBundle() BufferedTextOutput::BufferState* BufferedTextOutput::getBuffer() const { if ((mFlags&MULTITHREADED) != 0) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wexit-time-destructors" thread_local ThreadState ts; #pragma clang diagnostic pop while (ts.states.size() <= (size_t)mIndex) ts.states.add(nullptr); BufferState* bs = ts.states[mIndex].get(); if (bs != nullptr && bs->seq == mSeq) return bs; Loading
libs/binder/IMemory.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ private: // TODO: Reimplemement based on standard C++ container? }; static sp<HeapCache> gHeapCache = sp<HeapCache>::make(); [[clang::no_destroy]] static sp<HeapCache> gHeapCache = sp<HeapCache>::make(); /******************************************************************************/ Loading