linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] trace-cmd record: Always disable func_stack_trace in tracecmd_disable_all_tracing()
Date: Fri, 9 Aug 2024 21:21:52 -0400	[thread overview]
Message-ID: <20240809212152.6486337d@rorschach.local.home> (raw)

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

The function tracecmd_disable_all_tracing() is passed a boolean parameter
to decide to disable the tracers or not. If the tracers are not to be
disabled (as it resets the trace file) it also does not disable the
func_stack_trace. Unfortunately, that means the set_ftrace_filter gets
reset when the function stack tracing is still enabled, causing the end of
the trace to take a long time.

Always disable func_stack_trace option in tracecmd_disable_all_tracing().

Fixes: 935d5c5a033a5 ("trace-cmd reset: Remove functions in function tracing filters")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tracecmd/trace-record.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index 3c705270f1c5..6b88646a2b7f 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -2742,10 +2742,10 @@ void tracecmd_disable_all_tracing(int disable_tracer)
 
 	tracecmd_disable_tracing();
 
-	if (disable_tracer) {
-		disable_func_stack_trace();
+	disable_func_stack_trace();
+
+	if (disable_tracer)
 		set_plugin("nop");
-	}
 
 	reset_events();
 
-- 
2.43.0


                 reply	other threads:[~2024-08-10  1:21 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=20240809212152.6486337d@rorschach.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;
as well as URLs for NNTP newsgroup(s).