diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2018-05-22 13:54:35 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-05-22 10:59:22 -0300 |
commit | 5759a6820aadd38b2c8c10e93919eae8e31a9f9a (patch) | |
tree | 2d010382a05e1489d503374211340a097b65ec0e /tools/perf/util/symbol.c | |
parent | 4d004365e25251002935fc3843d80934248ad3ed (diff) | |
download | lwn-5759a6820aadd38b2c8c10e93919eae8e31a9f9a.tar.gz lwn-5759a6820aadd38b2c8c10e93919eae8e31a9f9a.zip |
perf machine: Allow for extra kernel maps
Identify extra kernel maps by name so that they can be distinguished
from the kernel map and module maps.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/1526986485-6562-8-git-send-email-adrian.hunter@intel.com
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.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 929058da6727..cdddae67f40c 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1030,7 +1030,7 @@ struct map *map_groups__first(struct map_groups *mg) return maps__first(&mg->maps); } -static int do_validate_kcore_modules(const char *filename, struct map *map, +static int do_validate_kcore_modules(const char *filename, struct map_groups *kmaps) { struct rb_root modules = RB_ROOT; @@ -1046,8 +1046,7 @@ static int do_validate_kcore_modules(const char *filename, struct map *map, struct map *next = map_groups__next(old_map); struct module_info *mi; - if (old_map == map || old_map->start == map->start) { - /* The kernel map */ + if (!__map__is_kmodule(old_map)) { old_map = next; continue; } @@ -1104,7 +1103,7 @@ static int validate_kcore_modules(const char *kallsyms_filename, kallsyms_filename)) return -EINVAL; - if (do_validate_kcore_modules(modules_filename, map, kmaps)) + if (do_validate_kcore_modules(modules_filename, kmaps)) return -EINVAL; return 0; |