From: Yannick Brosseau <scientist@fb.com>
To: <ak@linux.intel.com>
Cc: <linux-kernel@vger.kernel.org>, Yannick Brosseau <scientist@fb.com>
Subject: [PATCH] perf tools: use map->map_ip to get srcline when listing symbol
Date: Thu, 6 Aug 2015 10:30:41 -0700 [thread overview]
Message-ID: <1438882241-15175-1-git-send-email-scientist@fb.com> (raw)
Revert 5550171b2a9f8df26ff483051d060db06376b26d and do the address
mapping using map->map_ip instead of map__rip_2objdump when
calling get_srcline
Signed-off-by: Yannick Brosseau <scientist@fb.com>
---
tools/perf/util/callchain.c | 4 ++--
tools/perf/util/machine.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 9f643ee..359fb6b 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -830,8 +830,8 @@ char *callchain_list__sym_name(struct callchain_list *cl,
if (callchain_param.key == CCKEY_ADDRESS &&
cl->ms.map && !cl->srcline)
cl->srcline = get_srcline(cl->ms.map->dso,
- map__rip_2objdump(cl->ms.map,
- cl->ip),
+ cl->ms.map->map_ip(cl->ms.map,
+ cl->ip),
cl->ms.sym, false);
if (cl->srcline)
printed = scnprintf(bf, bfsize, "%s %s",
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 7ff6827..80a5eda 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1580,7 +1580,7 @@ static int add_callchain_ip(struct thread *thread,
}
}
- return callchain_cursor_append(&callchain_cursor, al.addr, al.map, al.sym);
+ return callchain_cursor_append(&callchain_cursor, ip, al.map, al.sym);
}
struct branch_info *sample__resolve_bstack(struct perf_sample *sample,
--
2.1.4
next reply other threads:[~2015-08-06 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 17:30 Yannick Brosseau [this message]
2015-08-07 0:14 ` Andi Kleen
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=1438882241-15175-1-git-send-email-scientist@fb.com \
--to=scientist@fb.com \
--cc=ak@linux.intel.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®