From: Namhyung Kim <namhyung@kernel.org>
To: vmolnaro@redhat.com
Cc: linux-perf-users@vger.kernel.org, acme@kernel.org,
acme@redhat.com, mpetlan@redhat.com, peterz@infradead.org,
mingo@redhat.com, mark.rutland@arm.com, irogers@google.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
adrian.hunter@intel.com, kan.liang@linux.intel.com
Subject: Re: [PATCH] perf dso: Fix symtab_type for kmod compression
Date: Sat, 12 Oct 2024 11:30:22 -0700 [thread overview]
Message-ID: <ZwrAPuAv-OlVMVj0@google.com> (raw)
In-Reply-To: <20241010144836.16424-1-vmolnaro@redhat.com>
On Thu, Oct 10, 2024 at 04:48:36PM +0200, vmolnaro@redhat.com wrote:
> From: Veronika Molnarova <vmolnaro@redhat.com>
>
> During the rework of the dso structure in patch ee756ef7491eafd an
> increment was forgotten for the symtab_type in case the data for
> the kernel module are compressed. This affects the probing of the
> kernel modules, which fails if the data are not already cached.
It's easy to miss something buried in a mass conversion. :(
>
> Increment the value of the symtab_type to its compressed variant so the
> data could be recovered successfully.
>
> Fixes: ee756ef7491eafd7 ("perf dso: Add reference count checking and accessor functions")
> Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks,
Namhyung
> ---
> tools/perf/util/machine.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index fad227b625d155c5..4f0ac998b0ccfd7a 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -1343,7 +1343,7 @@ static int maps__set_module_path(struct maps *maps, const char *path, struct kmo
> * we need to update the symtab_type if needed.
> */
> if (m->comp && is_kmod_dso(dso)) {
> - dso__set_symtab_type(dso, dso__symtab_type(dso));
> + dso__set_symtab_type(dso, dso__symtab_type(dso)+1);
> dso__set_comp(dso, m->comp);
> }
> map__put(map);
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-10-12 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 14:48 [PATCH] perf dso: Fix symtab_type for kmod compression vmolnaro
2024-10-12 18:30 ` Namhyung Kim [this message]
2024-10-14 13:07 ` Michael Petlan
2024-10-17 16:39 ` 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=ZwrAPuAv-OlVMVj0@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mpetlan@redhat.com \
--cc=peterz@infradead.org \
--cc=vmolnaro@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.