All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tracing: Reset the function filter after completing trampoline/graph selftest
@ 2022-04-27  3:41 Li Huafei
  0 siblings, 0 replies; only message in thread
From: Li Huafei @ 2022-04-27  3:41 UTC (permalink / raw)
  To: rostedt; +Cc: mingo, jolsa, linux-kernel, lihuafei1

The direct trampoline and graph coexistence test sets global_ops to
trace only 'trace_selftest_dynamic_test_func', but does not reset it
after the test is completed, resulting in the function filter being set
already after the system starts. Although it can be reset through the
tracefs interface, it is more or less confusing to the user, and we
should reset it to trace all functions after the trampoline/graph test
completes.

Fixes: 130c08065848 ("tracing: Add trampoline/graph selftest")
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
---
 kernel/trace/trace_selftest.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index abcadbe933bb..a2d301f58ced 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -895,6 +895,9 @@ trace_selftest_startup_function_graph(struct tracer *trace,
 		ret = -1;
 		goto out;
 	}
+
+	/* Enable tracing on all functions again */
+	ftrace_set_global_filter(NULL, 0, 1);
 #endif
 
 	/* Don't test dynamic tracing, the function tracer already did */
-- 
2.17.1


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

only message in thread, other threads:[~2022-04-27  3:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27  3:41 [PATCH v2] tracing: Reset the function filter after completing trampoline/graph selftest Li Huafei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.