diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-10-16 17:30:11 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-10-16 17:30:11 +0200 |
commit | ec57e2f0acb01710cd465bc04495ed03a9e0fea1 (patch) | |
tree | 9f45889ba31b750f99fd3d0b625684d9b4cd4f17 /tools/perf/util/map.c | |
parent | locking/lockdep: Remove duplicated 'lock_class_ops' percpu array (diff) | |
parent | x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y (diff) | |
download | linux-ec57e2f0acb01710cd465bc04495ed03a9e0fea1.tar.xz linux-ec57e2f0acb01710cd465bc04495ed03a9e0fea1.zip |
Merge branch 'x86/build' into locking/core, to pick up dependent patches and unify jump-label work
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 36d0763311ef..6a6929f208b4 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -576,6 +576,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) { @@ -591,6 +598,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; |