public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
To: masami.hiramatsu.pt@hitachi.com, mingo@elte.hu,
	linux-kernel@vger.kernel.org, acme@infradead.org
Cc: ananth@in.ibm.com, Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	rostedt@goodmis.org
Subject: [PATCH] perf - probe finder fails to resolve function name to address
Date: Thu, 22 Mar 2012 15:53:14 +0530	[thread overview]
Message-ID: <4F6AFD92.4030603@linux.vnet.ibm.com> (raw)
In-Reply-To: <4F6AF410.1010400@linux.vnet.ibm.com>

probe finder fails to resolve valid function names into addresses for
functions which have more than one die entries in DWARF info.

It is valid for DWARF info to contain more than 1 entries for a given
function name, where one entry corresponds to definition which has code
address/range attributes and remaining entries (which are only
declarations) does not have code address/range attributes.
(example: do_fork, sys_write, sys_wait4, sys_sync etc)

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. I have also removed the
warning as this is a valid thing to happen.

Signed-off-by: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
---

 tools/perf/util/probe-finder.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 5d73262..5e1e6f7 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -984,10 +984,7 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data)
 			param->retval = find_probe_point_lazy(sp_die, pf);
 		else {
 			if (dwarf_entrypc(sp_die, &pf->addr) != 0) {
-				pr_warning("Failed to get entry address of "
-					   "%s.\n", dwarf_diename(sp_die));
-				param->retval = -ENOENT;
-				return DWARF_CB_ABORT;
+				return DWARF_CB_OK;
 			}
 			pf->addr += pp->offset;
 			/* TODO: Check the address in this function */


       reply	other threads:[~2012-03-22 10:24 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 ` Prashanth Nageshappa [this message]
2012-03-23 12:52   ` [PATCH] perf - probe finder fails to resolve function name to address 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:perf/urgent] perf probe: Finder " tip-bot for Prashanth Nageshappa

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=4F6AFD92.4030603@linux.vnet.ibm.com \
    --to=prashanth@linux.vnet.ibm.com \
    --cc=acme@infradead.org \
    --cc=ananth@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.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