From 3cb8bc6ac95ff86147d11ee1d36d18e1ddf3637c Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Thu, 25 Feb 2010 08:35:27 -0500 Subject: perf probe: Fix bugs in line range finder Fix find_line_range_by_line() to init line_list and remove misconseptional found marking which should be done when real lines are found (if there is no lines probe-able, find_line_range() should return 0). Signed-off-by: Masami Hiramatsu Cc: systemtap Cc: DLE Cc: Frederic Weisbecker Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: K.Prasad Cc: Frederic Weisbecker Cc: Ananth N Mavinakayanahalli LKML-Reference: <20100225133527.6725.52418.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar --- tools/perf/util/probe-finder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 1b2124d..3e10dbe 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -788,6 +788,7 @@ static void find_line_range_by_line(struct line_finder *lf) Dwarf_Addr addr; int ret; + INIT_LIST_HEAD(&lf->lr->line_list); ret = dwarf_srclines(lf->cu_die, &lines, &cnt, &__dw_error); DIE_IF(ret != DW_DLV_OK); @@ -848,8 +849,6 @@ static int linefunc_callback(struct die_link *dlink, void *data) lr->start = lf->lno_s; lr->end = lf->lno_e; find_line_range_by_line(lf); - /* If we find a target function, this should be end. */ - lf->found = 1; return 1; } return 0; -- cgit v1.1