From: Arnaldo Carvalho de Melo Date: Wed, 21 Oct 2015 18:45:13 +0000 (-0300) Subject: perf annotate: Add debug message for out of bounds sample X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e3d006ce8180a0c025ce66bdc89bbc125f85be57;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf annotate: Add debug message for out of bounds sample Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-q0lde9ajs84oi38nlyjcqbwg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index d1eece70b84d..0fc8d7a2fea5 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -548,8 +548,11 @@ static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map, pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr)); - if (addr < sym->start || addr >= sym->end) + if (addr < sym->start || addr >= sym->end) { + pr_debug("%s(%d): ERANGE! sym->name=%s, start=%#" PRIx64 ", addr=%#" PRIx64 ", end=%#" PRIx64 "\n", + __func__, __LINE__, sym->name, sym->start, addr, sym->end); return -ERANGE; + } offset = addr - sym->start; h = annotation__histogram(notes, evidx);