This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH -tip v3&10 12/18] perf probe: Fix bugs in line range finder
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: Ingo Molnar <mingo at elte dot hu>, Frederic Weisbecker <fweisbec at gmail dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, lkml<linux-kernel at vger dot kernel dot org>
- Cc: systemtap<systemtap at sources dot redhat dot com>, DLE<dle-develop at lists dot sourceforge dot net>, Masami Hiramatsu <mhiramat at redhat dot com>, Ingo Molnar <mingo at elte dot hu>, Frederic Weisbecker <fweisbec at gmail dot com>, Arnaldo Carvalho de Melo <acme at redhat dot com>, Peter Zijlstra <peterz at infradead dot org>, Paul Mackerras <paulus at samba dot org>, Mike Galbraith <efault at gmx dot de>, "K.Prasad" <prasad at linux dot vnet dot ibm dot com>
- Date: Thu, 25 Feb 2010 08:35:27 -0500
- Subject: [PATCH -tip v3&10 12/18] perf probe: Fix bugs in line range finder
- References: <20100225133342.6725.26971.stgit@localhost6.localdomain6>
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: Ingo Molnar <mingo@elte.hu>
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>
---
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;
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com