Merge changes from topic "cherrypick-perf-metrics"

* changes:
  gs-common:dumpstate: Combine Temperature Residency bugreport to pixel_metrics
  gs-common:dumpstate: Dump long irq metrics, resume latency metrics at bugreport
This commit is contained in:
Ziyi Cui 2022-11-29 01:03:02 +00:00 committed by Android (Google) Code Review
commit 2fdae9fa6e
10 changed files with 30 additions and 7 deletions

10
pixel_metrics/Android.bp Normal file
View file

@ -0,0 +1,10 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "dump_pixel_metrics.sh",
src: "dump_pixel_metrics.sh",
vendor: true,
sub_dir: "dump",
}

View file

@ -0,0 +1,7 @@
#!/vendor/bin/sh
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

View file

@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/pixel_metrics/sepolicy
PRODUCT_PACKAGES += dump_pixel_metrics.sh

View file

@ -0,0 +1,5 @@
pixel_bugreport(dump_pixel_metrics)
#vendor-metrics
r_dir_file(dump_pixel_metrics, sysfs_vendor_metrics)
allow dump_pixel_metrics vendor_toolbox_exec:file execute_no_trans;

View file

@ -0,0 +1 @@
/vendor/bin/dump/dump_pixel_metrics\.sh u:object_r:dump_pixel_metrics_exec:s0

View file

@ -0,0 +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

View file

@ -44,5 +44,3 @@ echo "TMU_SUB rise thresholds:"
cat /sys/module/gs_thermal/parameters/tmu_sub_reg_dump_rise_thres cat /sys/module/gs_thermal/parameters/tmu_sub_reg_dump_rise_thres
echo "TMU_SUB fall thresholds:" echo "TMU_SUB fall thresholds:"
cat /sys/module/gs_thermal/parameters/tmu_sub_reg_dump_fall_thres 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

View file

@ -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 sysfs_thermal:lnk_file r_file_perms;
allow dump_thermal vendor_toolbox_exec:file execute_no_trans; 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;

View file

@ -1,5 +1,3 @@
# thermal sysfs files # thermal sysfs files
genfscon sysfs /module/gs_thermal/parameters u:object_r:sysfs_thermal:s0 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