diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-09-25 11:19:44 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-09-25 11:19:44 +0200 |
commit | fb437bc8fe36c964d9bf2f4b568e6c77c235c5e3 (patch) | |
tree | 7d3a08a88aad2e7541231f0241d97e64df4a4208 /tools/perf/util/map.c | |
parent | 49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61 (diff) | |
parent | 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84 (diff) | |
download | linux-fb437bc8fe36c964d9bf2f4b568e6c77c235c5e3.tar.bz2 |
Merge tag 'v4.19-rc5' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r-- | tools/perf/util/map.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 3f07a587c8e6..354e54550d2b 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -574,6 +574,13 @@ struct symbol *map_groups__find_symbol(struct map_groups *mg, return NULL; } +static bool map__contains_symbol(struct map *map, struct symbol *sym) +{ + u64 ip = map->unmap_ip(map, sym->start); + + return ip >= map->start && ip < map->end; +} + struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name, struct map **mapp) { @@ -589,6 +596,10 @@ struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name, if (sym == NULL) continue; + if (!map__contains_symbol(pos, sym)) { + sym = NULL; + continue; + } if (mapp != NULL) *mapp = pos; goto out; |