Loading cmds/dumpstate/dumpstate.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ void add_mountinfo(); #define ALT_PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops-0" #define BLK_DEV_SYS_DIR "/sys/block" #define AFLAGS "/system/bin/aflags" #define RECOVERY_DIR "/cache/recovery" #define RECOVERY_DATA_DIR "/data/misc/recovery" #define UPDATE_ENGINE_LOG_DIR "/data/misc/update_engine_log" Loading Loading @@ -1792,6 +1793,10 @@ Dumpstate::RunStatus Dumpstate::dumpstate() { RunCommand("ACONFIG FLAGS", {PRINT_FLAGS}, CommandOptions::WithTimeout(10).Always().DropRoot().Build()); RunCommand("ACONFIG FLAGS DUMP", {AFLAGS, "list"}, CommandOptions::WithTimeout(10).Always().AsRootIfAvailable().Build()); RunCommand("WHICH ACONFIG FLAG STORAGE", {AFLAGS, "which-backing"}, CommandOptions::WithTimeout(10).Always().AsRootIfAvailable().Build()); RunCommand("STORAGED IO INFO", {"storaged", "-u", "-p"}); Loading libs/binder/BackendUnifiedServiceManager.cpp +18 −5 Original line number Diff line number Diff line Loading @@ -34,37 +34,47 @@ using AidlServiceManager = android::os::IServiceManager; using IAccessor = android::os::IAccessor; static const char* kStaticCachableList[] = { // go/keep-sorted start "accessibility", "account", "activity", "android.hardware.thermal.IThermal/default", "android.hardware.power.IPower/default", "android.frameworks.stats.IStats/default", "android.system.suspend.ISystemSuspend/default", "alarm", "android.system.keystore2.IKeystoreService/default", "appops", "audio", "batterystats", "carrier_config", "connectivity", "content", "content_capture", "device_policy", "display", "dropbox", "econtroller", "graphicsstats", "input", "input_method", "isub", "jobscheduler", "legacy_permission", "location", "media.extractor", "media.metrics", "media.player", "media.resource_manager", "media_resource_monitor", "mount", "netd_listener", "netstats", "network_management", "nfc", "notification", "package", "package_native", "performance_hint", "permission", "permissionmgr", "permission_checker", "permissionmgr", "phone", "platform_compat", "power", Loading @@ -76,9 +86,12 @@ static const char* kStaticCachableList[] = { "time_detector", "trust", "uimode", "user", "virtualdevice", "virtualdevice_native", "webviewupdate", "window", // go/keep-sorted end }; bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string& serviceName) { Loading libs/debugstore/OWNERS +0 −1 Original line number Diff line number Diff line benmiles@google.com gaillard@google.com mohamadmahmoud@google.com libs/gui/BLASTBufferQueue.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ #include <sys/epoll.h> #include <sys/eventfd.h> #include <gui/FenceMonitor.h> #include <gui/FrameRateUtils.h> #include <gui/GLConsumer.h> #include <gui/IProducerListener.h> Loading Loading @@ -476,16 +475,6 @@ void BLASTBufferQueue::releaseBufferCallbackLocked( ATRACE_CALL(); BQA_LOGV("releaseBufferCallback %s", id.to_string().c_str()); if (CC_UNLIKELY(atrace_is_tag_enabled(ATRACE_TAG_GRAPHICS))) { if (!mFenceMonitor) { std::string monitorName = "release :"; monitorName.append(mName.c_str()); mFenceMonitor.emplace(monitorName.c_str()); } mFenceMonitor->queueFence(releaseFence); } // Calculate how many buffers we need to hold before we release them back // to the buffer queue. This will prevent higher latency when we are running // on a lower refresh rate than the max supported. We only do that for EGL Loading libs/gui/FenceMonitor.cpp +11 −25 Original line number Diff line number Diff line Loading @@ -25,18 +25,9 @@ namespace android::gui { FenceMonitor::FenceMonitor(const char* name) : mName(name), mFencesQueued(0), mFencesSignaled(0) { mThread = std::thread(&FenceMonitor::loop, this); } FenceMonitor::~FenceMonitor() { { std::lock_guard<std::mutex> lock(mMutex); mStopped = true; mCondition.notify_one(); } if (mThread.joinable()) { mThread.join(); } std::thread thread(&FenceMonitor::loop, this); pthread_setname_np(thread.native_handle(), mName); thread.detach(); } void FenceMonitor::queueFence(const sp<Fence>& fence) { Loading @@ -44,26 +35,24 @@ void FenceMonitor::queueFence(const sp<Fence>& fence) { std::lock_guard<std::mutex> lock(mMutex); if (fence->getSignalTime() != Fence::SIGNAL_TIME_PENDING) { snprintf(message, sizeof(message), "%s fence %u has signaled", mName.c_str(), mFencesQueued); snprintf(message, sizeof(message), "%s fence %u has signaled", mName, mFencesQueued); ATRACE_NAME(message); // Need an increment on both to make the trace number correct. mFencesQueued++; mFencesSignaled++; return; } snprintf(message, sizeof(message), "Trace %s fence %u", mName.c_str(), mFencesQueued); snprintf(message, sizeof(message), "Trace %s fence %u", mName, mFencesQueued); ATRACE_NAME(message); mQueue.push_back(fence); mCondition.notify_one(); mFencesQueued++; ATRACE_INT(mName.c_str(), int32_t(mQueue.size())); ATRACE_INT(mName, int32_t(mQueue.size())); } void FenceMonitor::loop() { pthread_setname_np(pthread_self(), mName.c_str()); while (!mStopped) { while (true) { threadLoop(); } } Loading @@ -73,18 +62,15 @@ void FenceMonitor::threadLoop() { uint32_t fenceNum; { std::unique_lock<std::mutex> lock(mMutex); while (mQueue.empty() && !mStopped) { while (mQueue.empty()) { mCondition.wait(lock); } if (mStopped) { return; } fence = mQueue[0]; fenceNum = mFencesSignaled; } { char message[64]; snprintf(message, sizeof(message), "waiting for %s %u", mName.c_str(), fenceNum); snprintf(message, sizeof(message), "waiting for %s %u", mName, fenceNum); ATRACE_NAME(message); status_t result = fence->waitForever(message); Loading @@ -96,7 +82,7 @@ void FenceMonitor::threadLoop() { std::lock_guard<std::mutex> lock(mMutex); mQueue.pop_front(); mFencesSignaled++; ATRACE_INT(mName.c_str(), int32_t(mQueue.size())); ATRACE_INT(mName, int32_t(mQueue.size())); } } Loading Loading
cmds/dumpstate/dumpstate.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ void add_mountinfo(); #define ALT_PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops-0" #define BLK_DEV_SYS_DIR "/sys/block" #define AFLAGS "/system/bin/aflags" #define RECOVERY_DIR "/cache/recovery" #define RECOVERY_DATA_DIR "/data/misc/recovery" #define UPDATE_ENGINE_LOG_DIR "/data/misc/update_engine_log" Loading Loading @@ -1792,6 +1793,10 @@ Dumpstate::RunStatus Dumpstate::dumpstate() { RunCommand("ACONFIG FLAGS", {PRINT_FLAGS}, CommandOptions::WithTimeout(10).Always().DropRoot().Build()); RunCommand("ACONFIG FLAGS DUMP", {AFLAGS, "list"}, CommandOptions::WithTimeout(10).Always().AsRootIfAvailable().Build()); RunCommand("WHICH ACONFIG FLAG STORAGE", {AFLAGS, "which-backing"}, CommandOptions::WithTimeout(10).Always().AsRootIfAvailable().Build()); RunCommand("STORAGED IO INFO", {"storaged", "-u", "-p"}); Loading
libs/binder/BackendUnifiedServiceManager.cpp +18 −5 Original line number Diff line number Diff line Loading @@ -34,37 +34,47 @@ using AidlServiceManager = android::os::IServiceManager; using IAccessor = android::os::IAccessor; static const char* kStaticCachableList[] = { // go/keep-sorted start "accessibility", "account", "activity", "android.hardware.thermal.IThermal/default", "android.hardware.power.IPower/default", "android.frameworks.stats.IStats/default", "android.system.suspend.ISystemSuspend/default", "alarm", "android.system.keystore2.IKeystoreService/default", "appops", "audio", "batterystats", "carrier_config", "connectivity", "content", "content_capture", "device_policy", "display", "dropbox", "econtroller", "graphicsstats", "input", "input_method", "isub", "jobscheduler", "legacy_permission", "location", "media.extractor", "media.metrics", "media.player", "media.resource_manager", "media_resource_monitor", "mount", "netd_listener", "netstats", "network_management", "nfc", "notification", "package", "package_native", "performance_hint", "permission", "permissionmgr", "permission_checker", "permissionmgr", "phone", "platform_compat", "power", Loading @@ -76,9 +86,12 @@ static const char* kStaticCachableList[] = { "time_detector", "trust", "uimode", "user", "virtualdevice", "virtualdevice_native", "webviewupdate", "window", // go/keep-sorted end }; bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string& serviceName) { Loading
libs/debugstore/OWNERS +0 −1 Original line number Diff line number Diff line benmiles@google.com gaillard@google.com mohamadmahmoud@google.com
libs/gui/BLASTBufferQueue.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ #include <sys/epoll.h> #include <sys/eventfd.h> #include <gui/FenceMonitor.h> #include <gui/FrameRateUtils.h> #include <gui/GLConsumer.h> #include <gui/IProducerListener.h> Loading Loading @@ -476,16 +475,6 @@ void BLASTBufferQueue::releaseBufferCallbackLocked( ATRACE_CALL(); BQA_LOGV("releaseBufferCallback %s", id.to_string().c_str()); if (CC_UNLIKELY(atrace_is_tag_enabled(ATRACE_TAG_GRAPHICS))) { if (!mFenceMonitor) { std::string monitorName = "release :"; monitorName.append(mName.c_str()); mFenceMonitor.emplace(monitorName.c_str()); } mFenceMonitor->queueFence(releaseFence); } // Calculate how many buffers we need to hold before we release them back // to the buffer queue. This will prevent higher latency when we are running // on a lower refresh rate than the max supported. We only do that for EGL Loading
libs/gui/FenceMonitor.cpp +11 −25 Original line number Diff line number Diff line Loading @@ -25,18 +25,9 @@ namespace android::gui { FenceMonitor::FenceMonitor(const char* name) : mName(name), mFencesQueued(0), mFencesSignaled(0) { mThread = std::thread(&FenceMonitor::loop, this); } FenceMonitor::~FenceMonitor() { { std::lock_guard<std::mutex> lock(mMutex); mStopped = true; mCondition.notify_one(); } if (mThread.joinable()) { mThread.join(); } std::thread thread(&FenceMonitor::loop, this); pthread_setname_np(thread.native_handle(), mName); thread.detach(); } void FenceMonitor::queueFence(const sp<Fence>& fence) { Loading @@ -44,26 +35,24 @@ void FenceMonitor::queueFence(const sp<Fence>& fence) { std::lock_guard<std::mutex> lock(mMutex); if (fence->getSignalTime() != Fence::SIGNAL_TIME_PENDING) { snprintf(message, sizeof(message), "%s fence %u has signaled", mName.c_str(), mFencesQueued); snprintf(message, sizeof(message), "%s fence %u has signaled", mName, mFencesQueued); ATRACE_NAME(message); // Need an increment on both to make the trace number correct. mFencesQueued++; mFencesSignaled++; return; } snprintf(message, sizeof(message), "Trace %s fence %u", mName.c_str(), mFencesQueued); snprintf(message, sizeof(message), "Trace %s fence %u", mName, mFencesQueued); ATRACE_NAME(message); mQueue.push_back(fence); mCondition.notify_one(); mFencesQueued++; ATRACE_INT(mName.c_str(), int32_t(mQueue.size())); ATRACE_INT(mName, int32_t(mQueue.size())); } void FenceMonitor::loop() { pthread_setname_np(pthread_self(), mName.c_str()); while (!mStopped) { while (true) { threadLoop(); } } Loading @@ -73,18 +62,15 @@ void FenceMonitor::threadLoop() { uint32_t fenceNum; { std::unique_lock<std::mutex> lock(mMutex); while (mQueue.empty() && !mStopped) { while (mQueue.empty()) { mCondition.wait(lock); } if (mStopped) { return; } fence = mQueue[0]; fenceNum = mFencesSignaled; } { char message[64]; snprintf(message, sizeof(message), "waiting for %s %u", mName.c_str(), fenceNum); snprintf(message, sizeof(message), "waiting for %s %u", mName, fenceNum); ATRACE_NAME(message); status_t result = fence->waitForever(message); Loading @@ -96,7 +82,7 @@ void FenceMonitor::threadLoop() { std::lock_guard<std::mutex> lock(mMutex); mQueue.pop_front(); mFencesSignaled++; ATRACE_INT(mName.c_str(), int32_t(mQueue.size())); ATRACE_INT(mName, int32_t(mQueue.size())); } } Loading