lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] tracing/probe: Test nr_args match in looking for same probe events
On Fri, 27 Sep 2019 19:08:53 +0530
Srikar Dronamraju <srikar@linux.vnet.ibm.com> wrote:
\> > ---
> > kernel/trace/trace_kprobe.c | 2 ++
> > kernel/trace/trace_uprobe.c | 2 ++
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> > index 402dc3ce88d3..d2543a403f25 100644
> > --- a/kernel/trace/trace_kprobe.c
> > +++ b/kernel/trace/trace_kprobe.c
> > @@ -537,6 +537,8 @@ static bool trace_kprobe_has_same_kprobe(struct trace_kprobe *orig,
> >
> > list_for_each_entry(pos, &tpe->probes, list) {
> > orig = container_of(pos, struct trace_kprobe, tp);
> > + if (orig->tp.nr_args != comp->tp.nr_args)
> > + continue;
>
> This has a side-effect where the newer probe has same argument commands, we
> still end up appending the probe.

??

How so?

If the two have the same number of arguments we do exactly what we did
before this patch. Please explain to me how that side effect would happen?

It basically is doing, "if the two probes do not have the same number
of arguments, don't bother comparing, because they are different."

-- Steve
\
 
 \ /
  Last update: 2019-09-27 17:07    [W:0.056 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site