|
From: tip-bot f. M. H. <mhi...@re...> - 2010-02-25 19:31:42
|
Commit-ID: 3cb8bc6ac95ff86147d11ee1d36d18e1ddf3637c Gitweb: http://git.kernel.org/tip/3cb8bc6ac95ff86147d11ee1d36d18e1ddf3637c Author: Masami Hiramatsu <mhi...@re...> AuthorDate: Thu, 25 Feb 2010 08:35:27 -0500 Committer: Ingo Molnar <mi...@el...> CommitDate: Thu, 25 Feb 2010 17:49:28 +0100 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 <mhi...@re...> Cc: systemtap <sys...@so...> Cc: DLE <dle...@li...> Cc: Frederic Weisbecker <fwe...@gm...> Cc: Arnaldo Carvalho de Melo <ac...@re...> Cc: Peter Zijlstra <pe...@in...> Cc: Paul Mackerras <pa...@sa...> Cc: Mike Galbraith <ef...@gm...> Cc: K.Prasad <pr...@li...> Cc: Frederic Weisbecker <fwe...@gm...> Cc: Ananth N Mavinakayanahalli <an...@in...> LKML-Reference: <20100225133527.6725.52418.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mi...@el...> --- tools/perf/util/probe-finder.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) 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; |