]> git.baikalelectronics.ru Git - kernel.git/commit
perf probe: Fix --line option behavior
authorNamhyung Kim <namhyung@kernel.org>
Tue, 1 Apr 2014 04:47:57 +0000 (13:47 +0900)
committerJiri Olsa <jolsa@redhat.com>
Mon, 14 Apr 2014 10:55:39 +0000 (12:55 +0200)
commitda1342ce6cf3ad1587cd3dbbe942bf719709e28d
treecb851ce23ae95871a5f3601f80cf1bd67cae7dfe
parent557761d4d3bce8eb08a5a649e25fd53a89cdad07
perf probe: Fix --line option behavior

The commit e081689878372 ("perf probe: Replace line_list with
intlist") replaced line_list to intlist but it has a problem that if a
same line was added again, it'd return -EEXIST rather than 1.

Since line_range_walk_cb() only checks the result being negative, it
resulted in failure or segfault sometimes.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/1396327677-3657-1-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
tools/perf/util/probe-finder.c