[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06bf52bd-43eb-74f9-dfb1-470e2e42fe51@amd.com>
Date: Tue, 10 Jan 2023 14:28:42 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Adrian Hunter <adrian.hunter@...el.com>, acme@...nel.org
Cc: jolsa@...nel.org, namhyung@...nel.org, irogers@...gle.com,
kan.liang@...ux.intel.com, peterz@...radead.org,
mark.rutland@....com, mingo@...hat.com,
alexander.shishkin@...ux.intel.com, james.clark@....com,
german.gomez@....com, leo.yan@...aro.org,
alexey.v.bayduraev@...ux.intel.com,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
sandipan.das@....com, ananth.narayan@....com,
santosh.shukla@....com, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [RFC 0/4] perf tool: Fix non-".text" symbol resolution for kernel
modules
On 10-Jan-23 2:13 PM, Ravi Bangoria wrote:
> Hi Adrian,
>
> On 10-Jan-23 12:05 PM, Adrian Hunter wrote:
>> On 10/01/23 07:58, Ravi Bangoria wrote:
>>> Kernel module elf contains executable code in non-".text" sections as
>>> well, for ex: ".noinstr.text". Plus, kernel module's memory layout
>>> differs from it's binary layout because .ko elf does not contain
>>> program header table.
>>
>> Have you looked at using perf record --kcore option.
>
> Nice! We can also use --kallsyms with perf report and it resolves symbols
> fine.
>
> But what about normal perf record/report? Why I'm enforcing on normal perf-
> record/report is because, generally user don't specify these options, esp if
> he has root privileges, he expects symbol-resolution should just work fine.
> But when he sees inconsistency in symbol-resolution of the same kernel module,
> he will be clueless of what's missing. This patchset is trying to solve it,
> although I too feel adding section specific maps to perf.data is overkill as
> --kcore or --kallsyms can also resolve those symbols.
FWIW, what this patchset does is not new. Perf already creates (pseudo) maps
for module elf sections while parsing symbol table: dso__process_kernel_symbol().
But perf does it incorrectly so this patchset is trying to fix it.
Thanks,
Ravi
Powered by blists - more mailing lists