* [PATCH 0/2] tools/bootconfig: Fix tracing settings export
@ 2026-11-28 11:57 Eduardo Mucelli Rezende Oliveira
2026-11-28 11:57 ` [PATCH 1/2] tools/bootconfig: Preserve event enable state when retrying histograms Eduardo Mucelli Rezende Oliveira
2026-11-28 11:57 ` [PATCH 2/2] tools/bootconfig: Export tracing state without the function graph tracer Eduardo Mucelli Rezende Oliveira
0 siblings, 2 replies; 3+ messages in thread
From: Eduardo Mucelli Rezende Oliveira @ 2026-11-28 11:57 UTC (permalink / raw)
To: mhiramat; +Cc: rostedt, linux-trace-kernel, linux-kernel
Hi Masami,
Thanks for reviewing the earlier bootconfig fixes. I found two more
issues in ftrace2bconf.sh.
The first drops an event's enable setting when a histogram depends on
another event and has to be retried. I reproduced this in a private
tracefs instance on my Ubuntu machine (7.0.0-44-generic). The fixed
export retained the setting and replay enabled the event again.
The second stops export on kernels built without the function graph
tracer. I reproduced the missing files with a fixture and checked the
tracer-enabled case on the same Ubuntu machine.
The series is based on bootconfig/fixes.
Thanks,
Eduardo
Eduardo Mucelli Rezende Oliveira (2):
tools/bootconfig: Preserve event enable state when retrying histograms
tools/bootconfig: Export tracing state without the function graph
tracer
tools/bootconfig/scripts/ftrace2bconf.sh | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
base-commit: 56bb11fe6aacc7666938e8e6765b44aa0cf1fcdd
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/2] tools/bootconfig: Preserve event enable state when retrying histograms
2026-11-28 11:57 [PATCH 0/2] tools/bootconfig: Fix tracing settings export Eduardo Mucelli Rezende Oliveira
@ 2026-11-28 11:57 ` Eduardo Mucelli Rezende Oliveira
2026-11-28 11:57 ` [PATCH 2/2] tools/bootconfig: Export tracing state without the function graph tracer Eduardo Mucelli Rezende Oliveira
1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Mucelli Rezende Oliveira @ 2026-11-28 11:57 UTC (permalink / raw)
To: mhiramat; +Cc: rostedt, linux-trace-kernel, linux-kernel
An event with a histogram dependency is exported after the main group
walk. On retry, GROUP_ENABLED still describes the last group in that
walk. If the last group is fully enabled, an enabled event in a mixed
group can lose its individual enable setting.
Look up the group enable state for the event being retried. Still
suppress the individual setting when all events are enabled globally or
the retried event's group is fully enabled.
Fixes: 1eaad3ac3f39 ("tools/bootconfig: Use per-group/all enable option in ftrace2bconf script")
Signed-off-by: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
---
tools/bootconfig/scripts/ftrace2bconf.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/bootconfig/scripts/ftrace2bconf.sh b/tools/bootconfig/scripts/ftrace2bconf.sh
index f62372adbfd598..b685dd6b070b0c 100755
--- a/tools/bootconfig/scripts/ftrace2bconf.sh
+++ b/tools/bootconfig/scripts/ftrace2bconf.sh
@@ -135,6 +135,11 @@ retry_unresolved() {
for evdir in $unresolved; do
event=${evdir##*/}
group=${evdir%/*}; group=${group##*/}
+ GROUP_ENABLED=$ALL_ENABLED
+ if [ "$ALL_ENABLED" -eq 0 ] &&
+ event_is_enabled "$INSTANCE/events/$group/enable"; then
+ GROUP_ENABLED=1
+ fi
per_event_options $evdir
done
}
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] tools/bootconfig: Export tracing state without the function graph tracer
2026-11-28 11:57 [PATCH 0/2] tools/bootconfig: Fix tracing settings export Eduardo Mucelli Rezende Oliveira
2026-11-28 11:57 ` [PATCH 1/2] tools/bootconfig: Preserve event enable state when retrying histograms Eduardo Mucelli Rezende Oliveira
@ 2026-11-28 11:57 ` Eduardo Mucelli Rezende Oliveira
1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Mucelli Rezende Oliveira @ 2026-11-28 11:57 UTC (permalink / raw)
To: mhiramat; +Cc: rostedt, linux-trace-kernel, linux-kernel
The function graph tracer provides max_graph_depth. With that tracer
omitted, the unconditional read fails under set -e, and ftrace2bconf
exits before exporting any ordinary tracing state.
Read the depth only when tracefs provides it. Check each available
function graph filter file and keep the existing warning when an
expanded filter list is present.
Fixes: 2b86062a34a8 ("tools/bootconfig: Add a script to generates bootconfig from ftrace")
Signed-off-by: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
---
tools/bootconfig/scripts/ftrace2bconf.sh | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tools/bootconfig/scripts/ftrace2bconf.sh b/tools/bootconfig/scripts/ftrace2bconf.sh
index b685dd6b070b0c..de571ec11b4392 100755
--- a/tools/bootconfig/scripts/ftrace2bconf.sh
+++ b/tools/bootconfig/scripts/ftrace2bconf.sh
@@ -45,14 +45,20 @@ emit_kv() { # key =|+= value
}
global_options() {
- val=`cat $TRACEFS/max_graph_depth`
- [ $val != 0 ] && emit_kv kernel.ftrace_graph_max_depth = $val
- if grep -qv "^#" $TRACEFS/set_graph_function $TRACEFS/set_graph_notrace ; then
+ if [ -f "$TRACEFS/max_graph_depth" ]; then
+ val=$(cat "$TRACEFS/max_graph_depth")
+ [ "$val" != 0 ] && emit_kv kernel.ftrace_graph_max_depth = "$val"
+ fi
+ for filter in "$TRACEFS/set_graph_function" "$TRACEFS/set_graph_notrace"; do
+ if [ ! -f "$filter" ] || ! grep -qv "^#" "$filter"; then
+ continue
+ fi
cat 1>&2 << EOF
# WARN: Cannot export kernel.ftrace_graph_filter and kernel.ftrace_graph_notrace.
# Only the expanded function list is available.
EOF
- fi
+ break
+ done
}
kprobe_event_options() {
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-28 11:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28 11:57 [PATCH 0/2] tools/bootconfig: Fix tracing settings export Eduardo Mucelli Rezende Oliveira
2026-11-28 11:57 ` [PATCH 1/2] tools/bootconfig: Preserve event enable state when retrying histograms Eduardo Mucelli Rezende Oliveira
2026-11-28 11:57 ` [PATCH 2/2] tools/bootconfig: Export tracing state without the function graph tracer Eduardo Mucelli Rezende Oliveira
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox