From: Menglong Dong <menglong.dong@linux.dev>
To: Menglong Dong <menglong8.dong@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>
Cc: mhiramat@kernel.org, mark.rutland@arm.com,
mathieu.desnoyers@efficios.com, ast@kernel.org,
jiang.biao@linux.dev, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] ftrace: fix address for jmp mode in t_show
Date: Wed, 17 Dec 2025 09:32:32 +0800 [thread overview]
Message-ID: <2816532.mvXUDI8C0e@7940hx> (raw)
In-Reply-To: <20251216112814.71588752@gandalf.local.home>
On 2025/12/17 00:28 Steven Rostedt <rostedt@goodmis.org> write:
> On Tue, 16 Dec 2025 11:45:33 +0800
> Menglong Dong <menglong8.dong@gmail.com> wrote:
>
> > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> > index bbb37c0f8c6c..d4c41fb76a25 100644
> > --- a/kernel/trace/ftrace.c
> > +++ b/kernel/trace/ftrace.c
> > @@ -4492,8 +4492,12 @@ static int t_show(struct seq_file *m, void *v)
> > unsigned long direct;
> >
> > direct = ftrace_find_rec_direct(rec->ip);
> > - if (direct)
> > - seq_printf(m, "\n\tdirect-->%pS", (void *)direct);
> > + if (direct) {
> > + seq_printf(m, ftrace_is_jmp(direct) ?
> > + "\n\tdirect(jmp)-->%pS" :
> > + "\n\tdirect-->%pS",
> > + (void *)ftrace_jmp_get(direct));
>
> A little cleaner way to do the above:
>
> seq_printf(m, "\n\tdirect%s-->%pS",
> ftrace_is_jmp(direct) ? "(jmp)" : "",
> (void *)ftrace_jmp_get(direct));
Yeah, looks better. I'll send a V2 later.
Thanks!
Menglong Dong
>
>
> -- Steve
>
> > + }
> > }
> > }
>
>
prev parent reply other threads:[~2025-12-17 1:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 3:45 [PATCH] ftrace: fix address for jmp mode in t_show Menglong Dong
2025-12-16 16:28 ` Steven Rostedt
2025-12-17 1:32 ` Menglong Dong [this message]
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=2816532.mvXUDI8C0e@7940hx \
--to=menglong.dong@linux.dev \
--cc=ast@kernel.org \
--cc=jiang.biao@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=menglong8.dong@gmail.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.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