diff options
author | Jimmy Shiu <jimmyshiu@google.com> | 2021-10-28 05:50:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-10-28 05:50:30 +0000 |
commit | 524999b76380ada3cc183d3dc5807743d21b937e (patch) | |
tree | 78edfb66040bd4a58a0d978a20bbf5319d27ca77 | |
parent | da1275bc4576f12522d2aa36cc8b15f4e558ea40 (diff) | |
parent | 9b255f20d2a9ba9642c9c5ba50cf56e486bb128e (diff) | |
download | pixel-524999b76380ada3cc183d3dc5807743d21b937e.tar.gz |
Merge "ADPF: fix stale trace status" into sc-v2-dev
-rw-r--r-- | power-libperfmgr/aidl/PowerHintSession.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/power-libperfmgr/aidl/PowerHintSession.cpp b/power-libperfmgr/aidl/PowerHintSession.cpp index 3db6ea15..359fcc3c 100644 --- a/power-libperfmgr/aidl/PowerHintSession.cpp +++ b/power-libperfmgr/aidl/PowerHintSession.cpp @@ -146,6 +146,8 @@ PowerHintSession::PowerHintSession(int32_t tgid, int32_t uid, const std::vector< ATRACE_INT(sz.c_str(), (int64_t)mDescriptor->duration.count()); sz = StringPrintf("adpf.%s-active", idstr.c_str()); ATRACE_INT(sz.c_str(), mDescriptor->is_active.load()); + sz = StringPrintf("adpf.%s-stale", idstr.c_str()); + ATRACE_INT(sz.c_str(), isStale()); } PowerSessionManager::getInstance()->addPowerSession(this); // init boost @@ -443,6 +445,11 @@ void PowerHintSession::StaleHandler::updateStaleTimer() { duration_cast<nanoseconds>(next - now).count(), this, NULL); mIsMonitoringStale.store(true); } + if (ATRACE_ENABLED()) { + const std::string idstr = mSession->getIdString(); + std::string sz = StringPrintf("adpf.%s-stale", idstr.c_str()); + ATRACE_INT(sz.c_str(), 0); + } } } |