aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2010-02-25 08:35:27 -0500
committerIngo Molnar <[email protected]>2010-02-25 17:49:28 +0100
commit3cb8bc6ac95ff86147d11ee1d36d18e1ddf3637c (patch)
treef7b0b8bb88c5398527abaa74105af07824af7f3d
parentee391de876ae4272926b8632be04ed4a460321e3 (diff)
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 <[email protected]> Cc: systemtap <[email protected]> Cc: DLE <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: K.Prasad <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--tools/perf/util/probe-finder.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 1b2124d12f68..3e10dbe22ab8 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;