[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173886113592.496116.11615563462036645436.stgit@devnote2>
Date: Fri, 7 Feb 2025 01:58:56 +0900
From: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org,
Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 2/3] tracing: Remove checking the activity when module map is updating
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Remove unnecessary active check because tr->flags already checks it.
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
---
kernel/trace/trace.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0f010a34de84..5a064e712fd7 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -10090,15 +10090,6 @@ static void trace_module_remove_evals(struct module *mod)
static inline void trace_module_remove_evals(struct module *mod) { }
#endif /* CONFIG_TRACE_EVAL_MAP_FILE */
-static bool trace_array_active(struct trace_array *tr)
-{
- if (tr->current_trace != &nop_trace)
- return true;
-
- /* 0 is no events, 1 is all disabled */
- return trace_events_enabled(tr, NULL) > 1;
-}
-
static void trace_module_record(struct module *mod)
{
struct trace_array *tr;
@@ -10107,9 +10098,7 @@ static void trace_module_record(struct module *mod)
/* Update any persistent trace array that has already been started */
if ((tr->flags & (TRACE_ARRAY_FL_BOOT | TRACE_ARRAY_FL_LAST_BOOT)) ==
TRACE_ARRAY_FL_BOOT) {
- /* Only update if the trace array is active */
- if (trace_array_active(tr))
- save_mod(mod, tr);
+ save_mod(mod, tr);
}
}
}
Powered by blists - more mailing lists