Merge "Allow access to tracing/per_cpu/cpu?/trace files." am: 978e43d7a1
am: 693e05d21a
Change-Id: I82a74f322c38716f4ec1b14ed982f6a636edf051
diff --git a/cmds/atrace/atrace.rc b/cmds/atrace/atrace.rc
index d10c539..579cfaf 100644
--- a/cmds/atrace/atrace.rc
+++ b/cmds/atrace/atrace.rc
@@ -135,6 +135,42 @@
chmod 0666 /sys/kernel/debug/tracing/trace
chmod 0666 /sys/kernel/tracing/trace
+# Read and truncate the per-CPU kernel trace.
+# Cannot use wildcards in .rc files. Update this if there is a phone with
+# more CPUs.
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu0/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu0/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu1/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu1/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu2/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu2/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu3/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu3/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu4/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu4/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu5/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu5/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu6/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu6/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu6/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu7/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu8/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu8/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu9/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu9/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu10/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu10/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu11/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu11/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu12/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu12/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu13/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu13/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu14/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu14/trace
+ chmod 0666 /sys/kernel/debug/tracing/per_cpu/cpu15/trace
+ chmod 0666 /sys/kernel/tracing/per_cpu/cpu15/trace
+
on property:persist.debug.atrace.boottrace=1
start boottrace