All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf dso: Fix symtab_type for kmod compression
@ 2024-10-10 14:48 vmolnaro
  2024-10-12 18:30 ` Namhyung Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: vmolnaro @ 2024-10-10 14:48 UTC (permalink / raw)
  To: linux-perf-users, acme, acme
  Cc: mpetlan, peterz, mingo, namhyung, mark.rutland, irogers,
	alexander.shishkin, jolsa, adrian.hunter, kan.liang

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.

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>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-17 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 14:48 [PATCH] perf dso: Fix symtab_type for kmod compression vmolnaro
2024-10-12 18:30 ` Namhyung Kim
2024-10-14 13:07 ` Michael Petlan
2024-10-17 16:39 ` Namhyung Kim

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.