thermal: Update path reading for temperature residency metrics

Add temperature residency reset path
chown to system to reset from pixelstats

Bug: 193833982
Test: Local build and verify statsD logs
adb shell cmd stats print-logs && adb logcat -b all | grep -i 105045
Change-Id: Id73badfb8f8ff97a1a75b0544d3e1457ad0e2f84
This commit is contained in:
sashwinbalaji 2023-05-05 10:17:13 +08:00 committed by TreeHugger Robot
parent 525571a4c7
commit 755241a5ff
2 changed files with 12 additions and 3 deletions

View file

@ -902,6 +902,9 @@ on fs
on post-fs-data on post-fs-data
mkdir /data/vendor/powerstats 0771 system system mkdir /data/vendor/powerstats 0771 system system
chown system system /data/vendor/powerstats chown system system /data/vendor/powerstats
# Thermal Residency Stats (write 1 to reset)
chown system system /sys/kernel/metrics/thermal/tr_by_group/tmu/stats_reset
chown system system /sys/kernel/metrics/thermal/tr_by_group/spmic/stats_reset
on property:vendor.thermal.link_ready=1 on property:vendor.thermal.link_ready=1
# BCL # BCL

View file

@ -57,9 +57,15 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
UFS_ERR_PATH(auto_hibern8_err_count) UFS_ERR_PATH(auto_hibern8_err_count)
}, },
.AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once", .AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once",
.TempResidencyPaths = { .TempResidencyAndResetPaths = {
{
"/sys/kernel/metrics/thermal/tr_by_group/tmu/stats", "/sys/kernel/metrics/thermal/tr_by_group/tmu/stats",
"/sys/kernel/metrics/thermal/tr_by_group/tmu/stats_reset"
},
{
"/sys/kernel/metrics/thermal/tr_by_group/spmic/stats", "/sys/kernel/metrics/thermal/tr_by_group/spmic/stats",
"/sys/kernel/metrics/thermal/tr_by_group/spmic/stats_reset"
}
}, },
}; };