[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200710215621.eca829d202b912b74bec276c@kernel.org>
Date: Fri, 10 Jul 2020 21:56:21 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 4/4] perf-probe: Warn if the target function is GNU
Indirect function
On Fri, 10 Jul 2020 08:55:40 -0300
Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> Em Fri, Jul 10, 2020 at 12:30:08PM +0900, Masami Hiramatsu escreveu:
> > On Thu, 9 Jul 2020 07:36:54 -0700
> > Andi Kleen <andi@...stfloor.org> wrote:
> >
> > > > diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> > > > index 1e95a336862c..671176d39569 100644
> > > > --- a/tools/perf/util/probe-event.c
> > > > +++ b/tools/perf/util/probe-event.c
> > > > @@ -379,6 +379,11 @@ static int find_alternative_probe_point(struct debuginfo *dinfo,
> > > > address = sym->start;
> > > > else
> > > > address = map->unmap_ip(map, sym->start) - map->reloc;
> > > > + if (sym->type == STT_GNU_IFUNC) {
> > > > + pr_warning("Warning: The probe address (0x%lx) is in a GNU indirect function.\n"
> > > > + "This may not work as you expected unless you intend to probe the indirect function.\n",
> > >
> > > I would say something like this.
> > >
> > > Consider identifying the final function used at run time and set the
> > > probe directly on that.
> > >
> > > I think that's more useful to the user.
> >
> > Hmm, would you mean the default function which may be used for the symbol?
>
> Humm, I think he means that the user must somehow, knowing details
> involved in picking the final function, probe that one instead of the
> IFUNC one, right Andi?
Ah, I got it. OK, I'll update the message :)
Thank you,
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists