summaryrefslogtreecommitdiff
path: root/tools/perf/util/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r--tools/perf/util/event.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index f40cdd6ac126..2ddc75dee019 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -685,6 +685,7 @@ int machine__resolve(struct machine *machine, struct addr_location *al,
struct perf_sample *sample)
{
struct thread *thread;
+ struct dso *dso;
if (symbol_conf.guest_code && !machine__is_host(machine))
thread = machine__findnew_guest_code(machine, sample->pid);
@@ -695,9 +696,11 @@ int machine__resolve(struct machine *machine, struct addr_location *al,
dump_printf(" ... thread: %s:%d\n", thread__comm_str(thread), thread->tid);
thread__find_map(thread, sample->cpumode, sample->ip, al);
+ dso = al->map ? map__dso(al->map) : NULL;
dump_printf(" ...... dso: %s\n",
- al->map ? al->map->dso->long_name :
- al->level == 'H' ? "[hypervisor]" : "<not found>");
+ dso
+ ? dso->long_name
+ : (al->level == 'H' ? "[hypervisor]" : "<not found>"));
if (thread__is_filtered(thread))
al->filtered |= (1 << HIST_FILTER__THREAD);
@@ -715,8 +718,6 @@ int machine__resolve(struct machine *machine, struct addr_location *al,
}
if (al->map) {
- struct dso *dso = al->map->dso;
-
if (symbol_conf.dso_list &&
(!dso || !(strlist__has_entry(symbol_conf.dso_list,
dso->short_name) ||