Skip to contentSkip to conversation

tools/bootconfig: Add tracing_on support to helper scripts

PATCH In review Masami Hiramatsu 2 participants 4 messages Dec 9, 2020 – Jan 14, 2021 Extra boot config

lore
Share & tools
lore

Masami Hiramatsu

author maintainer
#0 lore raw

PATCH 1/1 tools/bootconfig: Add tracing_on support to helper scripts

Add ftrace.instance.INSTANCE.tracing_on support to ftrace2bconf.sh and bconf2ftrace.sh.

commit 8490db06f914 ("tracing/boot: Add per-instance tracing_on option support") added the per-instance tracing_on option, but forgot to update the helper scripts.

---
 tools/bootconfig/scripts/bconf2ftrace.sh |    1 +
 tools/bootconfig/scripts/ftrace2bconf.sh |    4 ++++
 2 files changed, 5 insertions(+)
tools/bootconfig/scripts/bconf2ftrace.sh +1 -0
index 595e164dc352..feb30c2c7881 100755
@@ -152,6 +152,7 @@ setup_instance() { # [instance]
 	set_array_of ${instance}.options ${instancedir}/trace_options
 	set_value_of ${instance}.trace_clock ${instancedir}/trace_clock
 	set_value_of ${instance}.cpumask ${instancedir}/tracing_cpumask
+	set_value_of ${instance}.tracing_on ${instancedir}/tracing_on
 	set_value_of ${instance}.tracer ${instancedir}/current_tracer
 	set_array_of ${instance}.ftrace.filters \
 		${instancedir}/set_ftrace_filter
tools/bootconfig/scripts/ftrace2bconf.sh +4 -0
index 6c0d4b61e0c2..a0c3bcc6da4f 100755
@@ -221,6 +221,10 @@ instance_options() { # [instance-name]
 	if [ `echo $val | sed -e s/f//g`x != x ]; then
 		emit_kv $PREFIX.cpumask = $val
 	fi
+	val=`cat $INSTANCE/tracing_on`
+	if [ `echo $val | sed -e s/f//g`x != x ]; then
+		emit_kv $PREFIX.tracing_on = $val
+	fi
 
 	val=
 	for i in `cat $INSTANCE/set_event`; do
#1 lore raw

Just noticed this patch. I'm adding it into my queue for the next merge window, as it doesn't look too urgent.

-- Steve

Quoted 40 lines · On Wed, 9 Dec 2020 14:27:44 +0900 Masami Hiramatsu <[email protected]> wrote:

Add ftrace.instance.INSTANCE.tracing_on support to ftrace2bconf.sh and bconf2ftrace.sh.

commit 8490db06f914 ("tracing/boot: Add per-instance tracing_on option support") added the per-instance tracing_on option, but forgot to update the helper scripts.

---
 tools/bootconfig/scripts/bconf2ftrace.sh |    1 +
 tools/bootconfig/scripts/ftrace2bconf.sh |    4 ++++
 2 files changed, 5 insertions(+)
tools/bootconfig/scripts/bconf2ftrace.sh +1 -0
index 595e164dc352..feb30c2c7881 100755
@@ -152,6 +152,7 @@ setup_instance() { # [instance]
 	set_array_of ${instance}.options ${instancedir}/trace_options
 	set_value_of ${instance}.trace_clock ${instancedir}/trace_clock
 	set_value_of ${instance}.cpumask ${instancedir}/tracing_cpumask
+	set_value_of ${instance}.tracing_on ${instancedir}/tracing_on
 	set_value_of ${instance}.tracer ${instancedir}/current_tracer
 	set_array_of ${instance}.ftrace.filters \
 		${instancedir}/set_ftrace_filter
tools/bootconfig/scripts/ftrace2bconf.sh +4 -0
index 6c0d4b61e0c2..a0c3bcc6da4f 100755
@@ -221,6 +221,10 @@ instance_options() { # [instance-name]
 	if [ `echo $val | sed -e s/f//g`x != x ]; then
 		emit_kv $PREFIX.cpumask = $val
 	fi
+	val=`cat $INSTANCE/tracing_on`
+	if [ `echo $val | sed -e s/f//g`x != x ]; then
+		emit_kv $PREFIX.tracing_on = $val
+	fi
 
 	val=
 	for i in `cat $INSTANCE/set_event`; do
author maintainer
#2 lore raw
Quoted 3 lines · On Wed, 13 Jan 2021 18:11:58 -0500 Steven Rostedt <[email protected]> wrote:

Just noticed this patch. I'm adding it into my queue for the next merge window, as it doesn't look too urgent.

Yes, it is not urgent, but it might be better to backport to 5.10.

Thank you,

Quoted 48 lines

-- Steve

Quoted 40 lines · On Wed, 9 Dec 2020 14:27:44 +0900 Masami Hiramatsu <[email protected]> wrote:

Add ftrace.instance.INSTANCE.tracing_on support to ftrace2bconf.sh and bconf2ftrace.sh.

commit 8490db06f914 ("tracing/boot: Add per-instance tracing_on option support") added the per-instance tracing_on option, but forgot to update the helper scripts.

---
 tools/bootconfig/scripts/bconf2ftrace.sh |    1 +
 tools/bootconfig/scripts/ftrace2bconf.sh |    4 ++++
 2 files changed, 5 insertions(+)
tools/bootconfig/scripts/bconf2ftrace.sh +1 -0
index 595e164dc352..feb30c2c7881 100755
@@ -152,6 +152,7 @@ setup_instance() { # [instance]
 	set_array_of ${instance}.options ${instancedir}/trace_options
 	set_value_of ${instance}.trace_clock ${instancedir}/trace_clock
 	set_value_of ${instance}.cpumask ${instancedir}/tracing_cpumask
+	set_value_of ${instance}.tracing_on ${instancedir}/tracing_on
 	set_value_of ${instance}.tracer ${instancedir}/current_tracer
 	set_array_of ${instance}.ftrace.filters \
 		${instancedir}/set_ftrace_filter
tools/bootconfig/scripts/ftrace2bconf.sh +4 -0
index 6c0d4b61e0c2..a0c3bcc6da4f 100755
@@ -221,6 +221,10 @@ instance_options() { # [instance-name]
 	if [ `echo $val | sed -e s/f//g`x != x ]; then
 		emit_kv $PREFIX.cpumask = $val
 	fi
+	val=`cat $INSTANCE/tracing_on`
+	if [ `echo $val | sed -e s/f//g`x != x ]; then
+		emit_kv $PREFIX.tracing_on = $val
+	fi
 
 	val=
 	for i in `cat $INSTANCE/set_event`; do
Signature · 1 line
Masami Hiramatsu <[email protected]>
#3 lore raw
Quoted 9 lines · On Thu, 14 Jan 2021 15:50:34 +0900 Masami Hiramatsu <[email protected]> wrote:
Quoted 3 lines · On Wed, 13 Jan 2021 18:11:58 -0500 Steven Rostedt <[email protected]> wrote:

Just noticed this patch. I'm adding it into my queue for the next merge window, as it doesn't look too urgent.

Yes, it is not urgent, but it might be better to backport to 5.10.

If it's something that should be backported, then I should send it now with a stable tag.

-- Steve