From: Don Zickus <dzickus@redhat.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: acme@ghostprotocols.net, jolsa@redhat.com, eranian@google.com,
Don Zickus <dzickus@redhat.com>
Subject: [PATCH 1/3] perf, machine: Use map as success in ip__resolve_ams
Date: Tue, 25 Feb 2014 22:43:45 -0500 [thread overview]
Message-ID: <1393386227-149412-2-git-send-email-dzickus@redhat.com> (raw)
In-Reply-To: <1393386227-149412-1-git-send-email-dzickus@redhat.com>
When trying to map a bunch of instruction addresses to their respective
threads, I kept getting a lot of bogus entries [I forget the exact reason
as I patched my code months ago].
Looking through ip__resovle_ams, I noticed the check for
if (al.sym)
and realized, most times I have an al.map definition but sometimes an
al.sym is undefined. In the cases where al.sym is undefined, the loop
keeps going even though a valid al.map exists.
Modify this check to use the more reliable al.map. This fixed my bogus
entries.
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
tools/perf/util/machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index ac37d78..813e94e 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1213,7 +1213,7 @@ static void ip__resolve_ams(struct machine *machine, struct thread *thread,
*/
thread__find_addr_location(thread, machine, m, MAP__FUNCTION,
ip, &al);
- if (al.sym)
+ if (al.map)
goto found;
}
found:
--
1.7.11.7
next prev parent reply other threads:[~2014-02-26 3:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 3:43 [PATCH 0/3] perf: misc fixes Don Zickus
2014-02-26 3:43 ` Don Zickus [this message]
2014-03-11 10:16 ` [tip:perf/urgent] perf machine: Use map as success in ip__resolve_ams tip-bot for Don Zickus
2014-02-26 3:43 ` [PATCH 2/3] perf, session: Change header.misc dump from decimal to hex Don Zickus
2014-03-18 8:30 ` [tip:perf/core] perf " tip-bot for Don Zickus
2014-02-26 3:43 ` [PATCH 3/3] perf: fix synthesizing mmaps for threads Don Zickus
2014-02-26 14:17 ` Arnaldo Carvalho de Melo
2014-02-26 14:32 ` Arnaldo Carvalho de Melo
2014-02-26 14:44 ` Don Zickus
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=1393386227-149412-2-git-send-email-dzickus@redhat.com \
--to=dzickus@redhat.com \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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®