]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Add guest_cpu to hypervisor threads
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 11 Jul 2022 09:31:55 +0000 (12:31 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 20 Jul 2022 14:08:04 +0000 (11:08 -0300)
commit8d9b4f7f7b3338b634d4faafea092b1db6737a7f
tree1fdfa09a245109903781b272162fa21acea03802
parent0c1061366c9ec15bc765a2228b84d6c60cb91ab3
perf tools: Add guest_cpu to hypervisor threads

It is possible to know which guest machine was running at a point in time
based on the PID of the currently running host thread. That is, perf
identifies guest machines by the PID of the hypervisor.

To determine the guest CPU, put it on the hypervisor (QEMU) thread for
that VCPU.

This is done when processing the id_index which provides the necessary
information.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.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-13-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c
tools/perf/util/thread.c
tools/perf/util/thread.h