[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z712hzvv22Ni63f1@google.com>
Date: Mon, 24 Feb 2025 23:51:35 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Kan Liang <kan.liang@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf report: Add 'tgid' sort key
On Mon, Feb 24, 2025 at 08:40:37PM -0800, Ian Rogers wrote:
> On Mon, Feb 24, 2025 at 6:51 PM Namhyung Kim <namhyung@...nel.org> wrote:
> > On Mon, Feb 24, 2025 at 10:18:37AM -0800, Ian Rogers wrote:
[SNIP]
> > > I thought the real-time processing had to use
> > > maps__fixup_overlap_and_insert (rather than maps__insert) as mmap
> > > events only give us VMA data and two mmaps may have been merged.
> > > Shouldn't doing this change be the simplest fix?
> >
> > Make sense. How about this?
>
> Lgtm, I have no way to test the issue. Why does maps__fixup_end need
> to get pushed later?
I just noticed it would add extra kernel maps after modules. I think it
should fixup end address of the kernel maps after adding all maps first.
Arnaldo, can you please test this?
Thanks,
Namhyung
>
> Thanks,
> Ian
>
> > Thanks,
> > Namhyung
> >
> >
> > ---8<---
> > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> > index 316f0879e5e08d66..d80b34717090db44 100644
> > --- a/tools/perf/util/machine.c
> > +++ b/tools/perf/util/machine.c
> > @@ -717,7 +717,7 @@ static int machine__process_ksymbol_register(struct machine *machine,
> >
> > map__set_start(map, event->ksymbol.addr);
> > map__set_end(map, map__start(map) + event->ksymbol.len);
> > - err = maps__insert(machine__kernel_maps(machine), map);
> > + err = maps__fixup_overlap_and_insert(machine__kernel_maps(machine), map);
> > if (err) {
> > err = -ENOMEM;
> > goto out;
> > @@ -1459,8 +1459,6 @@ static int machine__create_modules(struct machine *machine)
> > if (modules__parse(modules, machine, machine__create_module))
> > return -1;
> >
> > - maps__fixup_end(machine__kernel_maps(machine));
> > -
> > if (!machine__set_modules_path(machine))
> > return 0;
> >
> > @@ -1554,6 +1552,8 @@ int machine__create_kernel_maps(struct machine *machine)
> > }
> > }
> >
> > + maps__fixup_end(machine__kernel_maps(machine));
> > +
> > out_put:
> > dso__put(kernel);
> > return ret;
Powered by blists - more mailing lists