mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
perf session: Use sample->machine_pid to find guest machine
If machine_pid is set, use it to find the guest machine. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20220711093218.10967-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
3461b65da7
commit
6350490995
|
|
@ -1418,7 +1418,9 @@ static struct machine *machines__find_for_cpumode(struct machines *machines,
|
|||
(sample->cpumode == PERF_RECORD_MISC_GUEST_USER))) {
|
||||
u32 pid;
|
||||
|
||||
if (event->header.type == PERF_RECORD_MMAP
|
||||
if (sample->machine_pid)
|
||||
pid = sample->machine_pid;
|
||||
else if (event->header.type == PERF_RECORD_MMAP
|
||||
|| event->header.type == PERF_RECORD_MMAP2)
|
||||
pid = event->mmap.pid;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user