mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shengming Hu <hu.shengming@zte.com.cn>
Subject: [for-next][PATCH] fgraph: Remove coarse PID filtering from graph_entry()
Date: Wed, 26 Nov 2025 20:37:35 -0500	[thread overview]
Message-ID: <20251126203735.5775bfb3@gandalf.local.home> (raw)



  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
ftrace/for-next

Head SHA1: c264534c394a291495168dbf70094a89717e9023


Shengming Hu (1):
      fgraph: Remove coarse PID filtering from graph_entry()

----
 kernel/trace/trace.h                 | 9 ---------
 kernel/trace/trace_functions_graph.c | 3 ---
 2 files changed, 12 deletions(-)
---------------------------
commit c264534c394a291495168dbf70094a89717e9023
Author: Shengming Hu <hu.shengming@zte.com.cn>
Date:   Wed Nov 26 17:35:52 2025 +0800

    fgraph: Remove coarse PID filtering from graph_entry()
    
    With PID filtering working via ftrace_pids_enabled() and fgraph_pid_func,
    the coarse-grained ftrace_trace_task() check in graph_entry() is obsolete.
    
    It was only a fallback for uninitialized op->private (now fixed), and its
    removal ensures consistent PID filtering with standard function tracing.
    
    Also remove unused ftrace_trace_task() definition from trace.h.
    
    Cc: <wang.yaxin@zte.com.cn>
    Cc: <mhiramat@kernel.org>
    Cc: <mark.rutland@arm.com>
    Cc: <mathieu.desnoyers@efficios.com>
    Cc: <zhang.run@zte.com.cn>
    Cc: <yang.yang29@zte.com.cn>
    Link: https://patch.msgid.link/20251126173552333XoJZN20143fWbsdTEtWoU@zte.com.cn
    Signed-off-by: Shengming Hu <hu.shengming@zte.com.cn>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 85eabb454bee..b2b6a9775b44 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -1154,11 +1154,6 @@ struct ftrace_func_command {
 					char *params, int enable);
 };
 extern bool ftrace_filter_param __initdata;
-static inline int ftrace_trace_task(struct trace_array *tr)
-{
-	return this_cpu_read(tr->array_buffer.data->ftrace_ignore_pid) !=
-		FTRACE_PID_IGNORE;
-}
 extern int ftrace_is_dead(void);
 int ftrace_create_function_files(struct trace_array *tr,
 				 struct dentry *parent);
@@ -1176,10 +1171,6 @@ void ftrace_clear_pids(struct trace_array *tr);
 int init_function_trace(void);
 void ftrace_pid_follow_fork(struct trace_array *tr, bool enable);
 #else
-static inline int ftrace_trace_task(struct trace_array *tr)
-{
-	return 1;
-}
 static inline int ftrace_is_dead(void) { return 0; }
 static inline int
 ftrace_create_function_files(struct trace_array *tr,
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index a7f4b9a47a71..75ef660e2ed5 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -232,9 +232,6 @@ static int graph_entry(struct ftrace_graph_ent *trace,
 		return 1;
 	}
 
-	if (!ftrace_trace_task(tr))
-		return 0;
-
 	if (ftrace_graph_ignore_func(gops, trace))
 		return 0;
 

                 reply	other threads:[~2025-11-27  1:36 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=20251126203735.5775bfb3@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=hu.shengming@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@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

all inboxes | Powered by JetHome®