Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1673269

[PATCH/RFC 2/9] perf tools: Remove duplicate code

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject [PATCH/RFC 2/9] perf tools: Remove duplicate code
Date 2017-06-23 07:50 +0200
Message-ID <tVpDH-6AF-9@gated-at.bofh.it> (permalink)
References <tVpDH-6AF-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@intel.com>
Cc: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH/RFC 2/9] perf tools: Remove duplicate code Namhyung Kim <namhyung@kernel.org> - 2017-06-23 07:50 +0200

csiph-web