[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170623054827.3828-3-namhyung@kernel.org>
Date: Fri, 23 Jun 2017 14:48:20 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Jiri Olsa <jolsa@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, kernel-team@....com,
Masami Hiramatsu <mhiramat@...nel.org>,
Andi Kleen <andi@...stfloor.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Wang Nan <wangnan0@...wei.com>
Subject: [PATCH/RFC 2/9] perf tools: Remove duplicate code
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.hunter@...el.com>
Cc: Wang Nan <wangnan0@...wei.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.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
Powered by blists - more mailing lists