From: tip-bot for Don Zickus <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org,
eranian@google.com, hpa@zytor.com, mingo@kernel.org,
jolsa@redhat.com, tglx@linutronix.de, dzickus@redhat.com
Subject: [tip:perf/urgent] perf machine: Use map as success in ip__resolve_ams
Date: Tue, 11 Mar 2014 03:16:57 -0700 [thread overview]
Message-ID: <tip-fdf57dd052d5cbd415533ae98f4d423286a85220@git.kernel.org> (raw)
In-Reply-To: <1393386227-149412-2-git-send-email-dzickus@redhat.com>
Commit-ID: fdf57dd052d5cbd415533ae98f4d423286a85220
Gitweb: http://git.kernel.org/tip/fdf57dd052d5cbd415533ae98f4d423286a85220
Author: Don Zickus <dzickus@redhat.com>
AuthorDate: Tue, 25 Feb 2014 22:43:45 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 10 Mar 2014 11:19:36 -0300
perf machine: Use map as success in ip__resolve_ams
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__resolve_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>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1393386227-149412-2-git-send-email-dzickus@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@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 c872991..620a198 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:
next prev parent reply other threads:[~2014-03-11 10:17 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 ` [PATCH 1/3] perf, machine: Use map as success in ip__resolve_ams Don Zickus
2014-03-11 10:16 ` tip-bot for Don Zickus [this message]
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=tip-fdf57dd052d5cbd415533ae98f4d423286a85220@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox