1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/lib/perf/include/internal
Adrian Hunter b47bb18661 perf tools: Add machine_pid and vcpu to id_index
When injecting events from a guest perf.data file, the events will have
separate sample ID numbers. These ID numbers can then be used to determine
which machine an event belongs to. To facilitate that, add machine_pid and
vcpu to id_index records. For backward compatibility, these are added at
the end of the record, and the length of the record is used to determine
if they are present or not.

Note, this is needed because the events from a guest perf.data file contain
the pid/tid of the process running at that time inside the VM not the
pid/tid of the (QEMU) hypervisor thread. So a way is needed to relate
guest events back to the guest machine and VCPU, and using sample ID
numbers for that is relatively simple and convenient.

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-11-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-07-20 11:07:58 -03:00
..
cpumap.h perf cpumap: Add is_subset function 2022-04-01 16:19:35 -03:00
evlist.h libperf evlist: Add evsel as a parameter to ->idx() 2022-05-10 14:26:48 -03:00
evsel.h perf tools: Add machine_pid and vcpu to id_index 2022-07-20 11:07:58 -03:00
lib.h libperf: Add preadn() 2022-05-23 10:11:12 -03:00
mmap.h perf cpumap: Give CPUs their own type 2022-01-12 14:28:23 -03:00
tests.h libperf tests: Fix verbose printing 2021-08-24 15:05:35 -03:00
threadmap.h libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
xyarray.h libperf xyarray: Add bounds checks to xyarray__entry() 2021-04-20 08:11:33 -03:00