summary refs log tree commit diff
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-04-25 17:28:55 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 13:47:15 -0300
commitdce0478b5fa05147a69dc6dd6cfcaac2f0e0eb2f (patch)
tree5d79b042fb948164fd6e5c901238aae4081c41bc /tools/perf/util/symbol.c
parenta2f1c160fec491de394dbec930b192da98618803 (diff)
downloadlinux-dce0478b5fa05147a69dc6dd6cfcaac2f0e0eb2f.tar.gz
perf map: Remove enum_type arg to map_groups__first()
Only the symbol core needs to use that, so provide a __ variant for that
case, that will end up removed when we ditch the MAP__ split.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-x29k9e1ohastsoqbilp3mguh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 8d9967357354..5d77c60e63bf 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1044,6 +1044,16 @@ out_delete_from:
 	return ret;
 }
 
+static struct map *__map_groups__first(struct map_groups *mg, enum map_type type)
+{
+	return maps__first(&mg->maps[type]);
+}
+
+struct map *map_groups__first(struct map_groups *mg)
+{
+	return __map_groups__first(mg, MAP__FUNCTION);
+}
+
 static int do_validate_kcore_modules(const char *filename, struct map *map,
 				  struct map_groups *kmaps)
 {
@@ -1055,7 +1065,7 @@ static int do_validate_kcore_modules(const char *filename, struct map *map,
 	if (err)
 		return err;
 
-	old_map = map_groups__first(kmaps, map->type);
+	old_map = __map_groups__first(kmaps, map->type);
 	while (old_map) {
 		struct map *next = map_groups__next(old_map);
 		struct module_info *mi;
@@ -1218,7 +1228,7 @@ static int dso__load_kcore(struct dso *dso, struct map *map,
 	}
 
 	/* Remove old maps */
-	old_map = map_groups__first(kmaps, map->type);
+	old_map = __map_groups__first(kmaps, map->type);
 	while (old_map) {
 		struct map *next = map_groups__next(old_map);