From 3add9b2b48843d0fc9ccc55da2f2815882aeb78e Mon Sep 17 00:00:00 2001 From: Ziyi Cui Date: Fri, 25 Nov 2022 05:32:35 +0000 Subject: [PATCH] gs-common:dumpstate: Combine Temperature Residency bugreport to pixel_metrics Bug: 246799997 Test: Test: "adb bugreport" includes temp residency metrics capture. Change-Id: I51eb7f961bd1ddeb0b7cd7bb33d1a19fef9b2c92 --- pixel_metrics/dump_pixel_metrics.sh | 3 ++- pixel_metrics/sepolicy/genfs_contexts | 1 + thermal/dump_thermal.sh | 2 -- thermal/sepolicy/device.te | 2 -- thermal/sepolicy/dump_thermal.te | 3 --- thermal/sepolicy/genfs_contexts | 2 -- 6 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 thermal/sepolicy/device.te diff --git a/pixel_metrics/dump_pixel_metrics.sh b/pixel_metrics/dump_pixel_metrics.sh index 229f618..0c6e2c2 100644 --- a/pixel_metrics/dump_pixel_metrics.sh +++ b/pixel_metrics/dump_pixel_metrics.sh @@ -3,4 +3,5 @@ echo "Long running IRQ metrics" cat /sys/kernel/metrics/irq/long_irq_metrics echo "Resume latency metrics" cat /sys/kernel/metrics/resume_latency/resume_latency_metrics - +echo "Temperature Residency Metrics:" +cat /sys/kernel/metrics/temp_residency/temp_residency_all/stats diff --git a/pixel_metrics/sepolicy/genfs_contexts b/pixel_metrics/sepolicy/genfs_contexts index 36882aa..b914014 100644 --- a/pixel_metrics/sepolicy/genfs_contexts +++ b/pixel_metrics/sepolicy/genfs_contexts @@ -1,3 +1,4 @@ #vendor-metrics genfscon sysfs /kernel/metrics/resume_latency/resume_latency_metrics u:object_r:sysfs_vendor_metrics:s0 genfscon sysfs /kernel/metrics/irq/long_irq_metrics u:object_r:sysfs_vendor_metrics:s0 +genfscon sysfs /kernel/metrics/temp_residency/temp_residency_all/stats u:object_r:sysfs_vendor_metrics:s0 diff --git a/thermal/dump_thermal.sh b/thermal/dump_thermal.sh index 748753c..2b87da9 100644 --- a/thermal/dump_thermal.sh +++ b/thermal/dump_thermal.sh @@ -44,5 +44,3 @@ echo "TMU_SUB rise thresholds:" cat /sys/module/gs_thermal/parameters/tmu_sub_reg_dump_rise_thres echo "TMU_SUB fall thresholds:" cat /sys/module/gs_thermal/parameters/tmu_sub_reg_dump_fall_thres -echo "Temperature Residency Metrics:" -cat /sys/kernel/metrics/temp_residency/temp_residency_all/stats diff --git a/thermal/sepolicy/device.te b/thermal/sepolicy/device.te deleted file mode 100644 index 63640e3..0000000 --- a/thermal/sepolicy/device.te +++ /dev/null @@ -1,2 +0,0 @@ -#vendor-metrics -type sysfs_vendor_metrics, fs_type, sysfs_type; diff --git a/thermal/sepolicy/dump_thermal.te b/thermal/sepolicy/dump_thermal.te index 930b4dd..c36f7cd 100644 --- a/thermal/sepolicy/dump_thermal.te +++ b/thermal/sepolicy/dump_thermal.te @@ -5,6 +5,3 @@ allow dump_thermal sysfs_thermal:file r_file_perms; allow dump_thermal sysfs_thermal:lnk_file r_file_perms; allow dump_thermal vendor_toolbox_exec:file execute_no_trans; -#vendor-metrics -r_dir_file(dump_thermal, sysfs_vendor_metrics) -allow dump_thermal sysfs_vendor_metrics:lnk_file r_file_perms; diff --git a/thermal/sepolicy/genfs_contexts b/thermal/sepolicy/genfs_contexts index 5cecbd3..1422e63 100644 --- a/thermal/sepolicy/genfs_contexts +++ b/thermal/sepolicy/genfs_contexts @@ -1,5 +1,3 @@ # thermal sysfs files genfscon sysfs /module/gs_thermal/parameters u:object_r:sysfs_thermal:s0 -#vendor-metrics -genfscon sysfs /kernel/metrics/temp_residency/temp_residency_all/stats u:object_r:sysfs_vendor_metrics:s0