tools/bootconfig: Add a script to generate ftrace shell-command from bootconfig
authorMasami Hiramatsu <mhiramat@kernel.org>
Mon, 10 Aug 2020 08:35:11 +0000 (17:35 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 19 Sep 2020 02:17:13 +0000 (22:17 -0400)
commit7e66ef0046ccf896674955b819c27c49783a4deb
treea9a99f9746401a8eb7f6ed676c41f2ac50c365ee
parent483ce6708dce7116ef2c83b36a1cfe28a36c4fc9
tools/bootconfig: Add a script to generate ftrace shell-command from bootconfig

Add a bconf2ftrace.sh under tools/bootconfig/scripts which generates
a shell script to setup boot-time trace from bootconfig file for testing
the bootconfig.

bconf2ftrace.sh will take a bootconfig file (includes boot-time tracing)
and convert it into a shell-script which is almost same as the boot-time
tracer does.
If --apply option is given, it also tries to apply those command to the
running kernel, which requires the root privilege (or sudo).

For example, if you just want to confirm the shell commands, save
the output as below.

 # bconf2ftrace.sh ftrace.bconf > ftrace.sh

Or, you can apply it directly.

 # bconf2ftrace.sh --apply ftrace.bconf

Note that some boot-time tracing parameters under kernel.* are not able
to set via tracefs nor procfs (e.g. tp_printk, traceoff_on_warning.),
so those are ignored.

Link: https://lkml.kernel.org/r/159704851101.175360.15119132351139842345.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
MAINTAINERS
tools/bootconfig/scripts/bconf2ftrace.sh [new file with mode: 0755]
tools/bootconfig/scripts/xbc.sh [new file with mode: 0644]