* [tip:perf/core] perf symbols: Use __map__is_kernel() instead of ad-hoc equivalent code
@ 2018-05-02 17:43 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2018-05-02 17:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, linux-kernel, hpa, dsahern, jolsa, adrian.hunter, acme,
mingo, namhyung, wangnan0
Commit-ID: efdd5c6b81185223e07452a2f8b5467f81b13d96
Gitweb: https://git.kernel.org/tip/efdd5c6b81185223e07452a2f8b5467f81b13d96
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Mon, 23 Apr 2018 16:43:47 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Apr 2018 13:47:00 -0300
perf symbols: Use __map__is_kernel() instead of ad-hoc equivalent code
Shorter, should be equivalent code, use it.
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-q90olng8sfkvrnsrwu7xnul6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 1466814ebada..2b6292cff719 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1163,7 +1163,6 @@ static int dso__load_kcore(struct dso *dso, struct map *map,
const char *kallsyms_filename)
{
struct map_groups *kmaps = map__kmaps(map);
- struct machine *machine;
struct kcore_mapfn_data md;
struct map *old_map, *new_map, *replacement_map = NULL;
bool is_64_bit;
@@ -1174,10 +1173,8 @@ static int dso__load_kcore(struct dso *dso, struct map *map,
if (!kmaps)
return -EINVAL;
- machine = kmaps->machine;
-
/* This function requires that the map is the kernel map */
- if (map != machine->vmlinux_maps[map->type])
+ if (!__map__is_kernel(map))
return -EINVAL;
if (!filename_from_kallsyms_filename(kcore_filename, "kcore",
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-02 17:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-02 17:43 [tip:perf/core] perf symbols: Use __map__is_kernel() instead of ad-hoc equivalent code tip-bot for Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox