diff options
Diffstat (limited to 'tools/perf/util')
| -rw-r--r-- | tools/perf/util/annotate.c | 4 | ||||
| -rw-r--r-- | tools/perf/util/map.c | 1 | ||||
| -rw-r--r-- | tools/perf/util/map.h | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 70f5a4dc17e9..08c6d138a655 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
| @@ -64,8 +64,8 @@ int symbol__inc_addr_samples(struct symbol *sym, struct map *map, | |||
| 64 | 64 | ||
| 65 | pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr)); | 65 | pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr)); |
| 66 | 66 | ||
| 67 | if (addr > sym->end) | 67 | if (addr < sym->start || addr > sym->end) |
| 68 | return 0; | 68 | return -ERANGE; |
| 69 | 69 | ||
| 70 | offset = addr - sym->start; | 70 | offset = addr - sym->start; |
| 71 | h = annotation__histogram(notes, evidx); | 71 | h = annotation__histogram(notes, evidx); |
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index dea6d1c1a954..35ae56864e4f 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c | |||
| @@ -38,6 +38,7 @@ void map__init(struct map *self, enum map_type type, | |||
| 38 | RB_CLEAR_NODE(&self->rb_node); | 38 | RB_CLEAR_NODE(&self->rb_node); |
| 39 | self->groups = NULL; | 39 | self->groups = NULL; |
| 40 | self->referenced = false; | 40 | self->referenced = false; |
| 41 | self->erange_warned = false; | ||
| 41 | } | 42 | } |
| 42 | 43 | ||
| 43 | struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, | 44 | struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, |
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index b100c20b7f94..81371bad4ef0 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h | |||
| @@ -33,6 +33,7 @@ struct map { | |||
| 33 | u64 end; | 33 | u64 end; |
| 34 | u8 /* enum map_type */ type; | 34 | u8 /* enum map_type */ type; |
| 35 | bool referenced; | 35 | bool referenced; |
| 36 | bool erange_warned; | ||
| 36 | u32 priv; | 37 | u32 priv; |
| 37 | u64 pgoff; | 38 | u64 pgoff; |
| 38 | 39 | ||
