From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] trace-cmd record: Do not delete existing instance
Date: Thu, 27 Aug 2026 17:43:07 -0400 [thread overview]
Message-ID: <20260827174307.601e5643@gandalf.local.home> (raw)
From: Steven Rostedt <rostedt@goodmis.org>
When trace-cmd record uses -B on an existing instance, it deletes it when
finished. If the instance existed when the record started, it should not
delete it when finished.
Fixes: 49b36d72b4d16 ("libtracefs: Combine allocate and create APIs into one")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tracecmd/trace-record.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index e7bb2f58ac4d..1ee3effca114 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -384,6 +384,7 @@ struct buffer_instance *allocate_instance(const char *name)
instance->tracefs = tracefs_instance_create(name);
if (!instance->tracefs)
goto error;
+ instance->flags |= BUFFER_FL_KEEP;
}
return instance;
--
2.53.0
reply other threads:[~2026-08-27 21:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260827174307.601e5643@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.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