mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
To: mhiramat@kernel.org
Cc: rostedt@goodmis.org, linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] tools/bootconfig: Preserve all-f tracing CPU masks on export
Date: Sun, 22 Nov 2026 01:34:59 +0100	[thread overview]
Message-ID: <80d300fad70b4168e2355e8aef73baaef68e49a5.1795307698.git.edumucelli@gmail.com> (raw)
In-Reply-To: <cover.1795307698.git.edumucelli@gmail.com>

ftrace2bconf.sh skips tracing_cpumask values consisting only of f
digits. For example, on a four-CPU system this drops the mask f. If the
mask is subsequently narrowed to 3, replaying the export cannot restore
tracing on all four CPUs because the configuration has no cpumask entry.

Always emit the observed mask as one quoted bootconfig value so a replay
can restore it.

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 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/bootconfig/scripts/ftrace2bconf.sh b/tools/bootconfig/scripts/ftrace2bconf.sh
index c23e7cc8a..6d7a1bd68 100755
--- a/tools/bootconfig/scripts/ftrace2bconf.sh
+++ b/tools/bootconfig/scripts/ftrace2bconf.sh
@@ -278,9 +278,7 @@ instance_options() { # [instance-name]
 		emit_kv $PREFIX.alloc_snapshot
 	fi
 	val=`cat $INSTANCE/tracing_cpumask`
-	if [ `echo $val | sed -e s/f//g`x != x ]; then
-		emit_kv $PREFIX.cpumask = "\"$val\""
-	fi
+	emit_kv $PREFIX.cpumask = "\"$val\""
 	val=`cat $INSTANCE/tracing_on`
 	if [ "$val" = "0" ]; then
 		emit_kv $PREFIX.tracing_on = 0
-- 
2.53.0


      parent reply	other threads:[~2026-11-22  0:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  0:34 [PATCH 0/2] tools/bootconfig: Preserve tracing settings across export and replay Eduardo Mucelli Rezende Oliveira
2026-11-22  0:34 ` [PATCH 1/2] tools/bootconfig: Use the registered global tracing parameter names Eduardo Mucelli Rezende Oliveira
2026-11-22  0:34 ` Eduardo Mucelli Rezende Oliveira [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80d300fad70b4168e2355e8aef73baaef68e49a5.1795307698.git.edumucelli@gmail.com \
    --to=edumucelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®