linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] trace-cmd extract: Do not extract top level unless told to
@ 2023-06-01 11:50 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2023-06-01 11:50 UTC (permalink / raw)
  To: Linux Trace Devel; +Cc: Douglas RAILLARD

From: Steven Rostedt (Google) <rostedt@goodmis.org>

The trace-cmd extract man pages explicitly states that if the '-B'
option is used, it will only extract the given instance and not touch
any other buffer instance including the top level, unless '-t' is given
(for the top level) or '-a' (for all instances). But currently it is
hard coded to extract the top level. Make extract only touch what it is
told according to the documentation.

Reported-by: Douglas RAILLARD <douglas.raillard@arm.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217340
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index f852aa71..56b7991a 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -7278,7 +7278,7 @@ void trace_extract(int argc, char **argv)
 
 	type = get_trace_cmd_type(ctx.curr_cmd);
 
-	update_first_instance(ctx.instance, 1);
+	update_first_instance(ctx.instance, ctx.topt);
 	check_function_plugin();
 
 	if (!ctx.output)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-01 11:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01 11:50 [PATCH] trace-cmd extract: Do not extract top level unless told to Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).