[PATCH V2 0/2] perf symbols: Slightly improve module file executable section mappings

Adrian Hunter posted 2 patches 1 year, 10 months ago
There is a newer version of this series
tools/perf/Documentation/perf.txt |  2 ++
tools/perf/builtin-report.c       |  2 ++
tools/perf/builtin-script.c       |  3 ++
tools/perf/util/debug.c           |  3 ++
tools/perf/util/debug.h           |  1 +
tools/perf/util/python.c          |  1 +
tools/perf/util/session.c         | 11 ++++++
tools/perf/util/session.h         |  2 ++
tools/perf/util/symbol-elf.c      | 75 +++++++++++++++++++++++++++++++++++++--
9 files changed, 98 insertions(+), 2 deletions(-)
[PATCH V2 0/2] perf symbols: Slightly improve module file executable section mappings
Posted by Adrian Hunter 1 year, 10 months ago
Hi

Currently perf does not record module section addresses except for
the .text section. In general that means perf cannot get module section
mappings correct (except for .text) when loading symbols from a kernel
module file. (Note using --kcore does not have this issue)

Here are a couple of patches to help shed light upon and slightly improve
the situation.


Changes in V2:

  perf tools: Make it possible to see perf's kernel and module memory mappings
    - add dump to perf report (if no browser) as well as perf script
    - add 'perf --debug kmaps' option also to dump kmaps


Adrian Hunter (2):
      perf tools: Make it possible to see perf's kernel and module memory mappings
      perf symbols: Slightly improve module file executable section mappings

 tools/perf/Documentation/perf.txt |  2 ++
 tools/perf/builtin-report.c       |  2 ++
 tools/perf/builtin-script.c       |  3 ++
 tools/perf/util/debug.c           |  3 ++
 tools/perf/util/debug.h           |  1 +
 tools/perf/util/python.c          |  1 +
 tools/perf/util/session.c         | 11 ++++++
 tools/perf/util/session.h         |  2 ++
 tools/perf/util/symbol-elf.c      | 75 +++++++++++++++++++++++++++++++++++++--
 9 files changed, 98 insertions(+), 2 deletions(-)


Regards
Adrian
Re: [PATCH V2 0/2] perf symbols: Slightly improve module file executable section mappings
Posted by Namhyung Kim 1 year, 10 months ago
Hi Adrian,

On Tue, Feb 6, 2024 at 5:05 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> Hi
>
> Currently perf does not record module section addresses except for
> the .text section. In general that means perf cannot get module section
> mappings correct (except for .text) when loading symbols from a kernel
> module file. (Note using --kcore does not have this issue)
>
> Here are a couple of patches to help shed light upon and slightly improve
> the situation.
>
>
> Changes in V2:
>
>   perf tools: Make it possible to see perf's kernel and module memory mappings
>     - add dump to perf report (if no browser) as well as perf script
>     - add 'perf --debug kmaps' option also to dump kmaps
>
>
> Adrian Hunter (2):
>       perf tools: Make it possible to see perf's kernel and module memory mappings
>       perf symbols: Slightly improve module file executable section mappings

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

>
>  tools/perf/Documentation/perf.txt |  2 ++
>  tools/perf/builtin-report.c       |  2 ++
>  tools/perf/builtin-script.c       |  3 ++
>  tools/perf/util/debug.c           |  3 ++
>  tools/perf/util/debug.h           |  1 +
>  tools/perf/util/python.c          |  1 +
>  tools/perf/util/session.c         | 11 ++++++
>  tools/perf/util/session.h         |  2 ++
>  tools/perf/util/symbol-elf.c      | 75 +++++++++++++++++++++++++++++++++++++--
>  9 files changed, 98 insertions(+), 2 deletions(-)
>
>
> Regards
> Adrian
Re: [PATCH V2 0/2] perf symbols: Slightly improve module file executable section mappings
Posted by Namhyung Kim 1 year, 10 months ago
On Wed, Feb 7, 2024 at 9:26 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hi Adrian,
>
> On Tue, Feb 6, 2024 at 5:05 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
> >
> > Hi
> >
> > Currently perf does not record module section addresses except for
> > the .text section. In general that means perf cannot get module section
> > mappings correct (except for .text) when loading symbols from a kernel
> > module file. (Note using --kcore does not have this issue)
> >
> > Here are a couple of patches to help shed light upon and slightly improve
> > the situation.
> >
> >
> > Changes in V2:
> >
> >   perf tools: Make it possible to see perf's kernel and module memory mappings
> >     - add dump to perf report (if no browser) as well as perf script
> >     - add 'perf --debug kmaps' option also to dump kmaps
> >
> >
> > Adrian Hunter (2):
> >       perf tools: Make it possible to see perf's kernel and module memory mappings
> >       perf symbols: Slightly improve module file executable section mappings
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Hmm.. this is not applied cleanly.  Can you please rebase
onto the current perf-tools-next?

Thanks,
Namhyung