perf dso: Fix symtab_type for kmod compression
PATCH 1/1 perf dso: Fix symtab_type for kmod compression
From: Veronika Molnarova <[email protected]>
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.
--- tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/machine.c +1 -1
@@ -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);
Signature · 1 line
2.43.0
Quoted 6 lines · On Thu, Oct 10, 2024 at 04:48:36PM +0200, [email protected] wrote:
From: Veronika Molnarova <[email protected]>
During the rework of the dso structure in patch
ee756ef7491eafdan increment was forgotten for thesymtab_typein 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. :(
Quoted 6 lines
Increment the value of the
symtab_typeto 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 <[email protected]>
Thanks,
Namhyung
Quoted 20 lines
--- tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/machine.c +1
-1@@ -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);Signature · 1 line
2.43.0
Quoted 7 lines · On Thu, 10 Oct 2024, [email protected] wrote:
From: Veronika Molnarova <[email protected]>
During the rework of the dso structure in patch
ee756ef7491eafdan increment was forgotten for thesymtab_typein 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.
Quoted 5 lines
Increment the value of the
symtab_typeto 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 <[email protected]>
Quoted 21 lines
--- tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/machine.c +1
-1@@ -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);Signature · 1 line
2.43.0
Quoted 9 lines · On Thu, 10 Oct 2024 16:48:36 +0200, [email protected] wrote:
During the rework of the dso structure in patch
ee756ef7491eafdan increment was forgotten for thesymtab_typein 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_typeto its compressed variant so the data could be recovered successfully.[...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung