sm6375-common: power-libperfmgr: ADPF: fix stale trace status

Bug: 196192645
Test: Manual
Change-Id: Ibdbb8f47a16032ce3249aa667fa0c11e7869748f
This commit is contained in:
Jimmy Shiu 2024-07-18 20:16:00 +05:30 committed by Anand S
parent 8bd36d98f7
commit 31820c6a8a
No known key found for this signature in database
GPG key ID: 3B2983FA448B3D61

View file

@ -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()); ATRACE_INT(sz.c_str(), (int64_t)mDescriptor->duration.count());
sz = StringPrintf("adpf.%s-active", idstr.c_str()); sz = StringPrintf("adpf.%s-active", idstr.c_str());
ATRACE_INT(sz.c_str(), mDescriptor->is_active.load()); 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); PowerSessionManager::getInstance()->addPowerSession(this);
// init boost // init boost
@ -443,6 +445,11 @@ void PowerHintSession::StaleHandler::updateStaleTimer() {
duration_cast<nanoseconds>(next - now).count(), this, NULL); duration_cast<nanoseconds>(next - now).count(), this, NULL);
mIsMonitoringStale.store(true); 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);
}
} }
} }