diff options
-rw-r--r-- | cmds/atrace/atrace.cpp | 5 | ||||
-rw-r--r-- | cmds/atrace/atrace.rc | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp index 6f2159db23..8758516a4d 100644 --- a/cmds/atrace/atrace.cpp +++ b/cmds/atrace/atrace.cpp @@ -444,7 +444,10 @@ static bool setTraceBufferSizeKB(int size) // Set the default size of cmdline hashtable static bool setCmdlineSize() { - return writeStr(k_traceCmdlineSizePath, "8192"); + if (fileExists(k_traceCmdlineSizePath)) { + return writeStr(k_traceCmdlineSizePath, "8192"); + } + return true; } // Set the clock to the best available option while tracing. Use 'boot' if it's diff --git a/cmds/atrace/atrace.rc b/cmds/atrace/atrace.rc index cef41bebf4..5e9cef384b 100644 --- a/cmds/atrace/atrace.rc +++ b/cmds/atrace/atrace.rc @@ -15,6 +15,8 @@ on post-fs chown root shell /sys/kernel/tracing/options/overwrite chown root shell /sys/kernel/debug/tracing/options/print-tgid chown root shell /sys/kernel/tracing/options/print-tgid + chown root shell /sys/kernel/debug/tracing/options/saved_cmdlines_size + chown root shell /sys/kernel/tracing/options/saved_cmdlines_size chown root shell /sys/kernel/debug/tracing/events/sched/sched_switch/enable chown root shell /sys/kernel/tracing/events/sched/sched_switch/enable chown root shell /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable @@ -63,6 +65,8 @@ on post-fs chmod 0664 /sys/kernel/tracing/options/overwrite chmod 0664 /sys/kernel/debug/tracing/options/print-tgid chmod 0664 /sys/kernel/tracing/options/print-tgid + chmod 0664 /sys/kernel/debug/tracing/options/saved_cmdlines_size + chmod 0664 /sys/kernel/tracing/options/saved_cmdlines_size chmod 0664 /sys/kernel/debug/tracing/events/sched/sched_switch/enable chmod 0664 /sys/kernel/tracing/events/sched/sched_switch/enable chmod 0664 /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable |