The map_groups__set_module_path() is called after machine__create_module() which sets build-id and symtab type already. Also remove is_kmod_dso() as there's no user anymore.
Cc: Adrian Hunter <adrian.hun...@intel.com> Cc: Wang Nan <wangn...@huawei.com> Signed-off-by: Namhyung Kim <namhy...@kernel.org> --- tools/perf/util/machine.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index d7f31cb0a4cb..d838f893e639 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1024,12 +1024,6 @@ static char *get_kernel_version(const char *root_dir) return strdup(name); } -static bool is_kmod_dso(struct dso *dso) -{ - return dso->symtab_type == DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE || - dso->symtab_type == DSO_BINARY_TYPE__GUEST_KMODULE; -} - static int map_groups__set_module_path(struct map_groups *mg, const char *path, struct kmod_path *m) { @@ -1045,15 +1039,6 @@ static int map_groups__set_module_path(struct map_groups *mg, const char *path, return -ENOMEM; dso__set_long_name(map->dso, long_name, true); - dso__kernel_module_get_build_id(map->dso, ""); - - /* - * Full name could reveal us kmod compression, so - * we need to update the symtab_type if needed. - */ - if (m->comp && is_kmod_dso(map->dso)) - map->dso->symtab_type++; - return 0; } -- 2.13.1