From: Adrian Hunter <adrian.hunter@intel.com>
To: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Ian Rogers <irogers@google.com>
Subject: Re: [PATCH] perf test: Enable Symbols test to work with a current module dso
Date: Fri, 16 Feb 2024 11:47:11 +0200 [thread overview]
Message-ID: <c4d6a864-f1a6-47f0-ae03-c54556d34bc8@intel.com> (raw)
In-Reply-To: <CAP-5=fUrTzkAfXoto1P8SnTFApSSdt+mmWHCXSKVrr0kuphE0w@mail.gmail.com>
On 31/01/24 22:58, Ian Rogers wrote:
> On Wed, Jan 31, 2024 at 11:24 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
>>
>> The test needs a struct machine and creates one for the current host,
>> but a side-effect is that struct machine has set up kernel maps
>> including module maps.
>>
>> If the 'Symbols' test --dso option specifies a current kernel module,
>> it will already be present as a kernel dso, and a map with kmaps needs
>> to be used otherwise there will be a segfault - see below.
>>
>> For that case, find the existing map and use that. In that case also,
>> the dso is split by section into multiple dsos, so test those dsos
>> also. That in turn, shows up that those dsos have not had overlapping
>> symbols removed, so the test fails.
>>
>> Example:
>>
>> Before:
>>
>> $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/arch/x86/kvm/kvm-intel.ko
>> 70: Symbols :
>> --- start ---
>> Testing /lib/modules/6.7.2-local/kernel/arch/x86/kvm/kvm-intel.ko
>> Segmentation fault (core dumped)
>>
>> After:
>>
>> $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/arch/x86/kvm/kvm-intel.ko
>> 70: Symbols :
>> --- start ---
>> Testing /lib/modules/6.7.2-local/kernel/arch/x86/kvm/kvm-intel.ko
>> Overlapping symbols:
>> 41d30-41fbb l vmx_init
>> 41d30-41fbb g init_module
>> ---- end ----
>> Symbols: FAILED!
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>
> Reviewed-by: Ian Rogers <irogers@google.com>
>
Thanks Ian!
This patch is still OK.
next prev parent reply other threads:[~2024-02-16 9:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 19:24 [PATCH] perf test: Enable Symbols test to work with a current module dso Adrian Hunter
2024-01-31 20:58 ` Ian Rogers
2024-02-16 9:47 ` Adrian Hunter [this message]
2024-02-21 1:57 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4d6a864-f1a6-47f0-ae03-c54556d34bc8@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).