From d324da627ce54abf9708e2824c5b804247d5d761 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Fri, 17 Jun 2022 20:37:34 +0800 Subject: [PATCH 1/2] powerstats: set AoC clock for timestamp calculations Bug: 233923713 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I6476d2abb09003b376b9e32ffb4ee8a279bb3086 Signed-off-by: Darren Hsu --- powerstats/Gs201CommonDataProviders.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/powerstats/Gs201CommonDataProviders.cpp b/powerstats/Gs201CommonDataProviders.cpp index a6f08722..e361fc56 100644 --- a/powerstats/Gs201CommonDataProviders.cpp +++ b/powerstats/Gs201CommonDataProviders.cpp @@ -104,6 +104,8 @@ void addPlaceholderEnergyConsumers(std::shared_ptr p) { void addAoC(std::shared_ptr p) { // When the given timeout is 0, the timeout will be replaced with "120ms * statesCount". static const uint64_t TIMEOUT_MILLIS = 0; + // AoC clock is synced from "libaoc.c" + static const uint64_t AOC_CLOCK = 24576; std::string prefix = "/sys/devices/platform/19000000.aoc/control/"; // Add AoC cores (a32, ff1, hf0, and hf1) @@ -116,7 +118,7 @@ void addAoC(std::shared_ptr p) { std::vector> coreStates = { {"DWN", "off"}, {"RET", "retention"}, {"WFI", "wfi"}}; p->addStateResidencyDataProvider(std::make_unique(coreIds, - coreStates, TIMEOUT_MILLIS)); + coreStates, TIMEOUT_MILLIS, AOC_CLOCK)); // Add AoC voltage stats std::vector> voltageIds = { @@ -128,7 +130,7 @@ void addAoC(std::shared_ptr p) { {"UD", "underdrive"}}; p->addStateResidencyDataProvider( std::make_unique(voltageIds, voltageStates, - TIMEOUT_MILLIS)); + TIMEOUT_MILLIS, AOC_CLOCK)); // Add AoC monitor mode std::vector> monitorIds = { @@ -139,7 +141,7 @@ void addAoC(std::shared_ptr p) { }; p->addStateResidencyDataProvider( std::make_unique(monitorIds, monitorStates, - TIMEOUT_MILLIS)); + TIMEOUT_MILLIS, AOC_CLOCK)); // Add AoC restart count const GenericStateResidencyDataProvider::StateResidencyConfig restartCountConfig = { From fc7a93eef67e323bf8fe3cbe6f7216b1ecf808cb Mon Sep 17 00:00:00 2001 From: Jinting Lin Date: Thu, 16 Jun 2022 06:51:27 +0000 Subject: [PATCH 2/2] Remove the default setting of TCP logging property The property is only for lassen silent logging app which are not used internally. Bug: 235810999 Change-Id: If8c1cc6ea7be62356e8fe523838f1b3b1107cfb0 --- device.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/device.mk b/device.mk index 7889e3cb..2fd2e6ac 100644 --- a/device.mk +++ b/device.mk @@ -353,7 +353,6 @@ endif # CP Logging properties PRODUCT_PROPERTY_OVERRIDES += \ ro.vendor.sys.modem.logging.loc = /data/vendor/slog \ - persist.vendor.sys.silentlog.tcp = "On" \ ro.vendor.cbd.modem_removable = "1" \ ro.vendor.cbd.modem_type = "s5100sit" \ persist.vendor.sys.modem.logging.br_num=5 \