aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-02-25 08:35:27 -0500
committerIngo Molnar <mingo@elte.hu>2010-02-25 11:49:28 -0500
commit3cb8bc6ac95ff86147d11ee1d36d18e1ddf3637c (patch)
treef7b0b8bb88c5398527abaa74105af07824af7f3d /tools/perf
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 <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: K.Prasad <prasad@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> LKML-Reference: <20100225133527.6725.52418.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-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)
788 Dwarf_Addr addr; 788 Dwarf_Addr addr;
789 int ret; 789 int ret;
790 790
791 INIT_LIST_HEAD(&lf->lr->line_list);
791 ret = dwarf_srclines(lf->cu_die, &lines, &cnt, &__dw_error); 792 ret = dwarf_srclines(lf->cu_die, &lines, &cnt, &__dw_error);
792 DIE_IF(ret != DW_DLV_OK); 793 DIE_IF(ret != DW_DLV_OK);
793 794
@@ -848,8 +849,6 @@ static int linefunc_callback(struct die_link *dlink, void *data)
848 lr->start = lf->lno_s; 849 lr->start = lf->lno_s;
849 lr->end = lf->lno_e; 850 lr->end = lf->lno_e;
850 find_line_range_by_line(lf); 851 find_line_range_by_line(lf);
851 /* If we find a target function, this should be end. */
852 lf->found = 1;
853 return 1; 852 return 1;
854 } 853 }
855 return 0; 854 return 0;