From: Steven Rostedt <rostedt@goodmis.org>
To: duchangbin <changbin.du@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH] fgraph: Do not enable function_graph tracer when setting funcgraph-args
Date: Tue, 17 Jun 2025 23:00:24 -0400 [thread overview]
Message-ID: <20250617230024.322758dc@gandalf.local.home> (raw)
In-Reply-To: <ad0745b53e5046b79378bdc12ddfdd51@huawei.com>
On Wed, 18 Jun 2025 02:40:21 +0000
duchangbin <changbin.du@huawei.com> wrote:
> > diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
> > index 9234e2c39abf..b6211c304c7f 100644
> > --- a/kernel/trace/trace_functions_graph.c
> > +++ b/kernel/trace/trace_functions_graph.c
> > @@ -455,10 +455,16 @@ static int graph_trace_init(struct trace_array *tr)
> > return 0;
> > }
> >
> > +static struct tracer graph_trace;
> > +
> > static int ftrace_graph_trace_args(struct trace_array *tr, int set)
> > {
> > trace_func_graph_ent_t entry;
> >
> > + /* Do nothing if the current tracer is no this tracer */
> typo: no -> not
Oops, thanks.
>
> > + if (tr->current_trace != &graph_trace)
> > + return 0;
> > +
> This can fix the issue. But how are tr->current_trace and &graph_trace linked?
> When are they equal?
register_tracer() passes in what tr->current_trace gets set to when the
tracer is active.
-- Steve
>
> > if (set)
> > entry = trace_graph_entry_args;
> > else
> > --
> > 2.47.2
next prev parent reply other threads:[~2025-06-18 3:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 16:08 [PATCH] fgraph: Do not enable function_graph tracer when setting funcgraph-args Steven Rostedt
2025-06-18 1:58 ` duchangbin
2025-06-18 2:40 ` duchangbin
2025-06-18 3:00 ` Steven Rostedt [this message]
2025-06-18 3:31 ` Masami Hiramatsu
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=20250617230024.322758dc@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=changbin.du@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-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