aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-11-04 11:58:21 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-12 08:20:53 -0300
commitc1529738f5eb5fe7c472e0374ad7954d52566df9 (patch)
treed775318ebc513bf45924bf9696d61c1008856f8e /tools/perf/util/machine.c
parentperf annotate: Pass a 'map_symbol' in places receiving a pair of 'map' and 'symbol' pointers (diff)
downloadlinux-dev-c1529738f5eb5fe7c472e0374ad7954d52566df9.tar.xz
linux-dev-c1529738f5eb5fe7c472e0374ad7954d52566df9.zip
perf unwind: Use 'struct map_symbol' in 'struct unwind_entry'
To help in passing that info around to callchain routines that, for the same reason, are moving to use 'struct map_symbol'. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-epsiibeprpxa8qpwji47uskc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/machine.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index e768ef24633f..3874bb89ac79 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2448,9 +2448,10 @@ check_calls:
return 0;
}
-static int append_inlines(struct callchain_cursor *cursor,
- struct map *map, struct symbol *sym, u64 ip)
+static int append_inlines(struct callchain_cursor *cursor, struct map_symbol *ms, u64 ip)
{
+ struct symbol *sym = ms->sym;
+ struct map *map = ms->map;
struct inline_node *inline_node;
struct inline_list *ilist;
u64 addr;
@@ -2488,22 +2489,22 @@ static int unwind_entry(struct unwind_entry *entry, void *arg)
const char *srcline = NULL;
u64 addr = entry->ip;
- if (symbol_conf.hide_unresolved && entry->sym == NULL)
+ if (symbol_conf.hide_unresolved && entry->ms.sym == NULL)
return 0;
- if (append_inlines(cursor, entry->map, entry->sym, entry->ip) == 0)
+ if (append_inlines(cursor, &entry->ms, entry->ip) == 0)
return 0;
/*
* Convert entry->ip from a virtual address to an offset in
* its corresponding binary.
*/
- if (entry->map)
- addr = map__map_ip(entry->map, entry->ip);
+ if (entry->ms.map)
+ addr = map__map_ip(entry->ms.map, entry->ip);
- srcline = callchain_srcline(entry->map, entry->sym, addr);
+ srcline = callchain_srcline(entry->ms.map, entry->ms.sym, addr);
return callchain_cursor_append(cursor, entry->ip,
- entry->map, entry->sym,
+ entry->ms.map, entry->ms.sym,
false, NULL, 0, 0, 0, srcline);
}