Dump bts information

Get BTS information when capturing bugreport.

Bug: 335422086
Test: capture bugreport
Change-Id: I5ae9be35a3fc3c975ccc843e9daee6d4e0ac130a
This commit is contained in:
Midas Chien 2024-05-06 13:00:53 +00:00
parent 2522590c40
commit 15538c9845
5 changed files with 10 additions and 1 deletions

View File

@ -11,7 +11,7 @@ cc_binary {
"-Werror",
],
shared_libs: [
"libdump",
"libdump",
],
vendor: true,
relative_install_path: "dump",

View File

@ -18,5 +18,8 @@
int main() {
dumpFileContent("VENDOR PROC DUMP", "/proc/vendor_sched/dump_task");
dumpFileContent("BTS scenario", "/sys/kernel/debug/bts/scenario");
dumpFileContent("BTS vc", "/sys/kernel/debug/bts/vc");
dumpFileContent("BTS status", "/sys/kernel/debug/bts/status");
return 0;
}

View File

@ -1,3 +1,7 @@
pixel_bugreport(dump_perf)
allow dump_perf proc_vendor_sched:file r_file_perms;
userdebug_or_eng(`
allow dump_perf vendor_bts_debugfs:dir r_dir_perms;
allow dump_perf vendor_bts_debugfs:file r_file_perms;
')

View File

@ -1 +1,2 @@
type sysfs_pakills, fs_type, sysfs_type;
type vendor_bts_debugfs, fs_type, debugfs_type;

View File

@ -1,2 +1,3 @@
genfscon proc /sys/kernel/sched_pelt_multiplier u:object_r:proc_sched:s0
genfscon sysfs /kernel/vendor_mm/pa_kill u:object_r:sysfs_pakills:s0
genfscon debugfs /bts u:object_r:vendor_bts_debugfs:s0