From: Namhyung Kim Date: Tue, 14 Oct 2014 19:05:38 +0000 (-0300) Subject: perf tools: Fixup off-by-one comparision in maps__find X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4955ea225db42144d1667838f908315a16d51c5b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf tools: Fixup off-by-one comparision in maps__find map->end is the first addr _outside_ the a map, following the convention of vm_area_struct->vm_end. Signed-off-by: Namhyung Kim Acked-by: Stephane Eranian Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/8761fwh1nc.fsf@sejong.aot.lge.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 186418ba18db..2137c4596ec7 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -752,7 +752,7 @@ struct map *maps__find(struct rb_root *maps, u64 ip) m = rb_entry(parent, struct map, rb_node); if (ip < m->start) p = &(*p)->rb_left; - else if (ip > m->end) + else if (ip >= m->end) p = &(*p)->rb_right; else return m;