[PATCH] trace-cmd record: Always disable func_stack_trace in tracecmd_disable_all_tracing()

Steven Rostedt <[email protected]>
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
From: "Steven Rostedt (Google)" <[email protected]>

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) <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.