Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197Ab0BRXXH (ORCPT ); Thu, 18 Feb 2010 18:23:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9587 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088Ab0BRXXB (ORCPT ); Thu, 18 Feb 2010 18:23:01 -0500 From: Masami Hiramatsu Subject: [PATCH -tip 3/9] perf probe: Fix bugs in line range finder To: Ingo Molnar , lkml Cc: Paul Mackerras , Arnaldo Carvalho de Melo , Steven Rostedt , Jim Keniston , Ananth N Mavinakayanahalli , Christoph Hellwig , "Frank Ch. Eigler" , Jason Baron , "K.Prasad" , Peter Zijlstra , Srikar Dronamraju , Ulrich Drepper , Roland McGrath , Mike Galbraith , systemtap , DLE Date: Thu, 18 Feb 2010 18:27:25 -0500 Message-ID: <20100218232725.21679.33177.stgit@dhcp-100-2-132.bos.redhat.com> In-Reply-To: <20100218232701.21679.5195.stgit@dhcp-100-2-132.bos.redhat.com> References: <20100218232701.21679.5195.stgit@dhcp-100-2-132.bos.redhat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1723 Lines: 54 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 Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Mike Galbraith Cc: K.Prasad --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/