From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Song Chen <chensong_2000@189.cn>,
mingo@redhat.com, mhiramat@kernel.org,
linux-kernel@vger.kernel.org, xiehuan09@gmail.com
Subject: Re: [PATCH v2] trace/kprobe: remove duplicated calls of ring_buffer_event_data
Date: Wed, 19 Oct 2022 23:46:15 +0900 [thread overview]
Message-ID: <20221019234615.061b981d888b374220e39324@kernel.org> (raw)
In-Reply-To: <20221019093022.7ef5a0de@gandalf.local.home>
On Wed, 19 Oct 2022 09:30:22 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Wed, 19 Oct 2022 10:11:18 +0800
> Song Chen <chensong_2000@189.cn> wrote:
>
> > Function __kprobe_trace_func calls ring_buffer_event_data to
> > get a ring buffer, however, it has been done in above call
> > trace_event_buffer_reserve. So does __kretprobe_trace_func.
> >
> > This patch removes those duplicated calls.
> >
> > Signed-off-by: Song Chen <chensong_2000@189.cn>
>
> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>
> Masami, want to take this one?
yes, this looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thank you,
>
> -- Steve
>
> > ---
> > kernel/trace/trace_kprobe.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> > index 23f7f0ec4f4c..f905829b856b 100644
> > --- a/kernel/trace/trace_kprobe.c
> > +++ b/kernel/trace/trace_kprobe.c
> > @@ -1394,7 +1394,6 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
> > return;
> >
> > fbuffer.regs = regs;
> > - entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
> > entry->ip = (unsigned long)tk->rp.kp.addr;
> > store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize);
> >
> > @@ -1435,7 +1434,6 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
> > return;
> >
> > fbuffer.regs = regs;
> > - entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
> > entry->func = (unsigned long)tk->rp.kp.addr;
> > entry->ret_ip = get_kretprobe_retaddr(ri);
> > store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize);
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2022-10-19 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 2:11 Song Chen
2022-10-19 13:30 ` Steven Rostedt
2022-10-19 14:46 ` Masami Hiramatsu [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=20221019234615.061b981d888b374220e39324@kernel.org \
--to=mhiramat@kernel.org \
--cc=chensong_2000@189.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=xiehuan09@gmail.com \
/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®