From: tip-bot for Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
mingo@kernel.org, prashanth@linux.vnet.ibm.com,
ananth@in.ibm.com, masami.hiramatsu.pt@hitachi.com,
rostedt@goodmis.org, srikar@linux.vnet.ibm.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf probe: Finder fails to resolve function name to address
Date: Sat, 31 Mar 2012 00:44:17 -0700 [thread overview]
Message-ID: <tip-ba28c59bc9ed8fb7b9a753cd88ee54a2c4f6265b@git.kernel.org> (raw)
In-Reply-To: <4F703FB9.9020407@linux.vnet.ibm.com>
Commit-ID: ba28c59bc9ed8fb7b9a753cd88ee54a2c4f6265b
Gitweb: http://git.kernel.org/tip/ba28c59bc9ed8fb7b9a753cd88ee54a2c4f6265b
Author: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
AuthorDate: Mon, 26 Mar 2012 15:36:49 +0530
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 28 Mar 2012 11:56:49 -0300
perf probe: Finder fails to resolve function name to address
If DIE entries corresponding to declarations appear before definition
entry, probe finder returns error instead of continuing to look further
for a definition entry.
This patch ensures we reach to the DIE entry corresponding to the
definition and get the function address.
V2: A simpler solution based on Masami's suggestion.
Signed-off-by: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/4F703FB9.9020407@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-finder.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 2cc162d..d448984 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -972,10 +972,12 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data)
struct dwarf_callback_param *param = data;
struct probe_finder *pf = param->data;
struct perf_probe_point *pp = &pf->pev->point;
+ Dwarf_Attribute attr;
/* Check tag and diename */
if (dwarf_tag(sp_die) != DW_TAG_subprogram ||
- !die_compare_name(sp_die, pp->function))
+ !die_compare_name(sp_die, pp->function) ||
+ dwarf_attr(sp_die, DW_AT_declaration, &attr))
return DWARF_CB_OK;
/* Check declared file */
prev parent reply other threads:[~2012-03-31 7:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F6AF410.1010400@linux.vnet.ibm.com>
2012-03-22 10:23 ` [PATCH] perf - probe finder fails to resolve function name to address Prashanth Nageshappa
2012-03-23 12:52 ` Masami Hiramatsu
2012-03-26 9:52 ` Prashanth Nageshappa
2012-03-26 10:06 ` [RESEND]Re: " Prashanth Nageshappa
2012-03-26 10:51 ` Masami Hiramatsu
2012-03-28 11:47 ` Ingo Molnar
2012-03-28 12:59 ` [PATCH] perf: missing export.h file Eric Dumazet
2012-03-28 14:35 ` Arnaldo Carvalho de Melo
2012-03-28 21:44 ` David Miller
2012-03-29 6:12 ` Ingo Molnar
2012-03-28 14:33 ` [RESEND]Re: [PATCH] perf - probe finder fails to resolve function name to address Arnaldo Carvalho de Melo
2012-03-31 7:44 ` tip-bot for Prashanth Nageshappa [this message]
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=tip-ba28c59bc9ed8fb7b9a753cd88ee54a2c4f6265b@git.kernel.org \
--to=prashanth@linux.vnet.ibm.com \
--cc=acme@redhat.com \
--cc=ananth@in.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.