aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 60b3593d210d..4abd85c6346d 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1107,12 +1107,11 @@ static struct machine *machines__find_for_cpumode(struct machines *machines,
1107 union perf_event *event, 1107 union perf_event *event,
1108 struct perf_sample *sample) 1108 struct perf_sample *sample)
1109{ 1109{
1110 const u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
1111 struct machine *machine; 1110 struct machine *machine;
1112 1111
1113 if (perf_guest && 1112 if (perf_guest &&
1114 ((cpumode == PERF_RECORD_MISC_GUEST_KERNEL) || 1113 ((sample->cpumode == PERF_RECORD_MISC_GUEST_KERNEL) ||
1115 (cpumode == PERF_RECORD_MISC_GUEST_USER))) { 1114 (sample->cpumode == PERF_RECORD_MISC_GUEST_USER))) {
1116 u32 pid; 1115 u32 pid;
1117 1116
1118 if (event->header.type == PERF_RECORD_MMAP 1117 if (event->header.type == PERF_RECORD_MMAP