* [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh
@ 2026-10-21 18:16 Eduardo Mucelli Rezende Oliveira
2026-10-22 0:52 ` Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Mucelli Rezende Oliveira @ 2026-10-21 18:16 UTC (permalink / raw)
To: mhiramat; +Cc: rostedt, linux-trace-kernel, linux-kernel
A bootconfig containing ftrace.event.enable makes bconf2ftrace.sh try to
write to events/enable/enable. The per-event loop treats the global
enable key as an event named "enable" in a group with the same name.
Since events/enable is a file, this write fails. With --apply, the script
exits before it reaches the code that enables all events. The same thing
happens with ftrace.instance.NAME.event.enable.
Skip the global enable key in the per-event loop and let the existing
global handler write to events/enable.
Fixes: 1d8365a553a7 ("tools/bootconfig: Support per-group/all event enabling option")
Signed-off-by: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
---
This is my second submission to the Linux kernel. Feedback is welcome.
Tested with --apply in a temporary tracefs instance on my Ubuntu machine,
running kernel 7.0.0-38-generic, with recording disabled. The original
script exits with status 2 and leaves events disabled. With the fix, it
exits successfully and the instance's events/enable reads 1. Per-group
enabling works with both versions.
tools/bootconfig/scripts/bconf2ftrace.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bootconfig/scripts/bconf2ftrace.sh b/tools/bootconfig/scripts/bconf2ftrace.sh
index 850c207343..7745c97e7a 100755
--- a/tools/bootconfig/scripts/bconf2ftrace.sh
+++ b/tools/bootconfig/scripts/bconf2ftrace.sh
@@ -218,6 +218,7 @@ setup_events() { # prefix("ftrace" or "ftrace.instance.INSTANCE") [instance]
prefix="${1}.event"
if xbc_has_branch ${1}.event; then
for grpev in `xbc_subkeys ${1}.event 2`; do
+ [ "$grpev" = "enable" ] && continue
setup_event $prefix ${grpev%.*} ${grpev#*.} $2
done
fi
base-commit: a804c5742bff224d4cb4d25dd383554d598be32b
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh
2026-10-21 18:16 [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh Eduardo Mucelli Rezende Oliveira
@ 2026-10-22 0:52 ` Masami Hiramatsu
2026-10-23 8:22 ` Eduardo Mucelli
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2026-10-22 0:52 UTC (permalink / raw)
To: Eduardo Mucelli Rezende Oliveira
Cc: rostedt, linux-trace-kernel, linux-kernel
On Wed, 21 Oct 2026 20:16:26 +0200, Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com> wrote:
> A bootconfig containing ftrace.event.enable makes bconf2ftrace.sh try to
> write to events/enable/enable. The per-event loop treats the global
> enable key as an event named "enable" in a group with the same name.
>
> Since events/enable is a file, this write fails. With --apply, the script
> exits before it reaches the code that enables all events. The same thing
> happens with ftrace.instance.NAME.event.enable.
Good catch!
>
> Skip the global enable key in the per-event loop and let the existing
> global handler write to events/enable.
This looks good to me. Let me pick it too.
Thanks!
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh
2026-10-22 0:52 ` Masami Hiramatsu
@ 2026-10-23 8:22 ` Eduardo Mucelli
0 siblings, 0 replies; 3+ messages in thread
From: Eduardo Mucelli @ 2026-10-23 8:22 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: rostedt, linux-trace-kernel, linux-kernel
Thanks, Masami!
On Thu, Oct 22, 2026 at 2:52 AM Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> On Wed, 21 Oct 2026 20:16:26 +0200, Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com> wrote:
> > A bootconfig containing ftrace.event.enable makes bconf2ftrace.sh try to
> > write to events/enable/enable. The per-event loop treats the global
> > enable key as an event named "enable" in a group with the same name.
> >
> > Since events/enable is a file, this write fails. With --apply, the script
> > exits before it reaches the code that enables all events. The same thing
> > happens with ftrace.instance.NAME.event.enable.
>
> Good catch!
>
> >
> > Skip the global enable key in the per-event loop and let the existing
> > global handler write to events/enable.
>
> This looks good to me. Let me pick it too.
>
> Thanks!
>
> --
> Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
--
Eduardo Mucelli R. Oliveira -- http://eduar.do
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-23 8:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 18:16 [PATCH] tools/bootconfig: Fix enabling all events in bconf2ftrace.sh Eduardo Mucelli Rezende Oliveira
2026-10-22 0:52 ` Masami Hiramatsu
2026-10-23 8:22 ` Eduardo Mucelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox