[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[tip:perf/urgent] perf record: Use unmapped IP for inline callchain cursors
Commit-ID:  7a8a8fcf7b860e4b2d4edc787c844d41cad9dfcf
Author: Milian Wolff <>
AuthorDate: Wed, 26 Sep 2018 15:52:06 +0200
Committer: Arnaldo Carvalho de Melo <>
CommitDate: Fri, 5 Oct 2018 11:18:09 -0300

perf record: Use unmapped IP for inline callchain cursors

Only use the mapped IP to find inline frames, but keep using the
unmapped IP for the callchain cursor. This ensures we properly show the
unmapped IP when displaying a frame we received via the
dso__parse_addr_inlines API for a module which does not contain
sufficient debug symbols to show the srcline.

This is another follow-up to commit 19610184693c ("perf script: Show
virtual addresses instead of offsets").

Signed-off-by: Milian Wolff <>
Acked-by: Jiri Olsa <>
Tested-by: Ravi Bangoria <>
Tested-by: Arnaldo Carvalho de Melo <>
Cc: Jin Yao <>
Cc: Namhyung Kim <>
Cc: Sandipan Das <>
Fixes: 19610184693c ("perf script: Show virtual addresses instead of offsets")
[ Squashed a fix from Milian for a problem reported by Ravi, fixed up space damage ]
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/util/machine.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 0cb4f8bf3ca7..111ae858cbcb 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2286,7 +2286,8 @@ static int append_inlines(struct callchain_cursor *cursor,
if (!symbol_conf.inline_name || !map || !sym)
return ret;

- addr = map__rip_2objdump(map, ip);
+ addr = map__map_ip(map, ip);
+ addr = map__rip_2objdump(map, addr);

inline_node = inlines__tree_find(&map->dso->inlined_nodes, addr);
if (!inline_node) {
 \ /
  Last update: 2018-10-05 18:22    [W:0.041 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site