提交 4955ea22 编写于 作者: N Namhyung Kim 提交者: Arnaldo Carvalho de Melo

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: NNamhyung Kim <namhyung@kernel.org>
Acked-by: NStephane Eranian <eranian@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/8761fwh1nc.fsf@sejong.aot.lge.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 77faf4d0
...@@ -752,7 +752,7 @@ struct map *maps__find(struct rb_root *maps, u64 ip) ...@@ -752,7 +752,7 @@ struct map *maps__find(struct rb_root *maps, u64 ip)
m = rb_entry(parent, struct map, rb_node); m = rb_entry(parent, struct map, rb_node);
if (ip < m->start) if (ip < m->start)
p = &(*p)->rb_left; p = &(*p)->rb_left;
else if (ip > m->end) else if (ip >= m->end)
p = &(*p)->rb_right; p = &(*p)->rb_right;
else else
return m; return m;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册