From: Masami Hiramatsu Date: Wed, 21 Apr 2010 19:56:32 +0000 (-0400) Subject: perf probe: Fix to exit callback soon after finding too many probe points X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d1ee0413c8e2e0aa48510b1edfb3c4d2d43455b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf probe: Fix to exit callback soon after finding too many probe points Fix to exit callback soon after finding too many probe points. Don't try to continue searching because it already failed. Signed-off-by: Masami Hiramatsu Reported-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Frederic Weisbecker Cc: Ingo Molnar LKML-Reference: <20100421195632.24664.42598.stgit@localhost6.localdomain6> Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index e7ee52fd0e09..0d795bc3e1a8 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -871,6 +871,8 @@ static int probe_point_inline_cb(Dwarf_Die *in_die, void *data) (uintmax_t)pf->addr); param->retval = convert_probe_point(in_die, pf); + if (param->retval < 0) + return DWARF_CB_ABORT; } return DWARF_CB_OK; @@ -1106,6 +1108,8 @@ static int line_range_funcdecl_cb(Dwarf_Die *sp_die, void *data) return DWARF_CB_OK; param->retval = line_range_add_line(src, lineno, lf->lr); + if (param->retval < 0) + return DWARF_CB_ABORT; return DWARF_CB_OK; }