mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>
Cc: systemtap <systemtap@sources.redhat.com>,
	DLE <dle-develop@lists.sourceforge.net>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	Ingo Molnar <mingo@elte.hu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Paul Mackerras <paulus@samba.org>, Mike Galbraith <efault@gmx.de>,
	"K.Prasad" <prasad@linux.vnet.ibm.com>
Subject: [PATCH -tip v2 3/9] perf probe: Fix bugs in line range finder
Date: Mon, 22 Feb 2010 17:53:41 -0500	[thread overview]
Message-ID: <20100222225340.20686.66886.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20100222225320.20686.17645.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

  parent reply	other threads:[~2010-02-22 22:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 22:53 [PATCH -tip v2 0/9] perf-probe updates - use elfutils and introduce lazy matching Masami Hiramatsu
2010-02-22 22:53 ` [PATCH -tip v2 1/9] perf probe: Do not show --line option without dwarf support Masami Hiramatsu
2010-02-22 22:53 ` [PATCH -tip v2 2/9] perf probe: Update perf probe document Masami Hiramatsu
2010-02-22 22:53 ` Masami Hiramatsu [this message]
2010-02-22 22:53 ` [PATCH -tip v2 4/9] perf probe: Rename probe finder functions Masami Hiramatsu
2010-02-22 22:53 ` [PATCH -tip v2 5/9] perf probe: Use elfutils-libdw for analyzing debuginfo Masami Hiramatsu
2010-02-22 23:08   ` Ulrich Drepper
2010-02-22 23:13     ` Masami Hiramatsu
2010-02-22 23:18       ` Masami Hiramatsu
2010-02-22 23:20         ` Ulrich Drepper
2010-02-22 23:18       ` Ulrich Drepper
2010-02-22 22:54 ` [PATCH -tip v2 6/9] perf probe: Use libdw callback routines Masami Hiramatsu
2010-02-22 22:54 ` [PATCH -tip v2 7/9] perf probe: Check function address range strictly in line finder Masami Hiramatsu
2010-02-22 22:54 ` [PATCH -tip v2 8/9] perf probe: show more lines after last line Masami Hiramatsu
2010-02-22 22:54 ` [PATCH -tip v2 9/9] perf probe: Add lazy line matching support Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100222225340.20686.66886.stgit@localhost6.localdomain6 \
    --to=mhiramat@redhat.com \
    --cc=acme@redhat.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=prasad@linux.vnet.ibm.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®