aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/machine.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index c4acd2001db0..0cb4f8bf3ca7 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2312,7 +2312,7 @@ static int unwind_entry(struct unwind_entry *entry, void *arg)
2312{ 2312{
2313 struct callchain_cursor *cursor = arg; 2313 struct callchain_cursor *cursor = arg;
2314 const char *srcline = NULL; 2314 const char *srcline = NULL;
2315 u64 addr; 2315 u64 addr = entry->ip;
2316 2316
2317 if (symbol_conf.hide_unresolved && entry->sym == NULL) 2317 if (symbol_conf.hide_unresolved && entry->sym == NULL)
2318 return 0; 2318 return 0;
@@ -2324,7 +2324,8 @@ static int unwind_entry(struct unwind_entry *entry, void *arg)
2324 * Convert entry->ip from a virtual address to an offset in 2324 * Convert entry->ip from a virtual address to an offset in
2325 * its corresponding binary. 2325 * its corresponding binary.
2326 */ 2326 */
2327 addr = map__map_ip(entry->map, entry->ip); 2327 if (entry->map)
2328 addr = map__map_ip(entry->map, entry->ip);
2328 2329
2329 srcline = callchain_srcline(entry->map, entry->sym, addr); 2330 srcline = callchain_srcline(entry->map, entry->sym, addr);
2330 return callchain_cursor_append(cursor, entry->ip, 2331 return callchain_cursor_append(cursor, entry->ip,