diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-09-18 17:20:41 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-09-18 17:20:41 -0300 |
| commit | 7f16023bfcc4b1f2bbccf86219dc97473db6e0d6 (patch) | |
| tree | 0abbfba738d76af7a2af067f6c4cec901c2d3c13 /tools/perf/util | |
| parent | perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init (diff) | |
| parent | perf Documentation: Fix out-of-tree asciidoctor man page generation (diff) | |
| download | linux-7f16023bfcc4b1f2bbccf86219dc97473db6e0d6.tar.gz linux-7f16023bfcc4b1f2bbccf86219dc97473db6e0d6.zip | |
Merge remote-tracking branch 'acme/perf/urgent' into perf/core
To pick up fixes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
| -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; |
