Re: [PATCH v3] perf: fix the probe finder location (.dwo files)

From: Namhyung Kim
Date: Wed Feb 01 2023 - 21:55:46 EST


Hello,

On Wed, Feb 1, 2023 at 5:22 PM Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
>
> Em Sun, Jan 29, 2023 at 07:21:28PM -0400, Henry Castro escreveu:
> > If the file object is compiled using -gsplit-dwarf,
> > the probe finder location will fail.
> >
> > Signed-off-by: Henry Castro <hcvcastro@xxxxxxxxx>
> > ---
> >
> > Hi,
> >
> > Polite ping? Any feedback?
>
> Namhyung, are you ok now? Masami, can you please take a look and provide
> an Acked-by or Reviewed-by?

Sorry about that. I completely missed this..
Now it looks ok, but it'd be nice if Masami could review this.

Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks,
Namhyung


> > tools/perf/util/probe-finder.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> > index 50d861a80f57..5f6781e712db 100644
> > --- a/tools/perf/util/probe-finder.c
> > +++ b/tools/perf/util/probe-finder.c
> > @@ -1200,6 +1200,20 @@ static int debuginfo__find_probe_location(struct debuginfo *dbg,
> > continue;
> > }
> >
> > +#if _ELFUTILS_PREREQ(0, 171)
> > + {
> > + uint8_t unit_type;
> > + Dwarf_Die cudie, subdie;
> > +
> > + /* Check separate debug information file. */
> > + if (dwarf_cu_info(pf->cu_die.cu, NULL,
> > + &unit_type, &cudie,
> > + &subdie, NULL,
> > + NULL, NULL) == 0
> > + && unit_type == DW_UT_skeleton)
> > + pf->cu_die = subdie;
> > + }
> > +#endif
> > /* Check if target file is included. */
> > if (pp->file)
> > pf->fname = cu_find_realpath(&pf->cu_die, pp->file);
> > --
> > 2.20.1
> >
>
> --
>
> - Arnaldo