Centos-kernel-stream-9/tools/lib/perf/include/internal
Michael Petlan f19ab613ef perf tools: Add machine_pid and vcpu to id_index
Bugzilla: https://bugzilla.redhat.com/2123229

upstream
========
commit b47bb18661eaed30790d70b7563a5220b3c59594
Author: Adrian Hunter <adrian.hunter@intel.com>
Date: Mon Jul 11 12:31:53 2022 +0300

description
===========
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>

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
2022-11-14 20:25:45 +01:00
..
cpumap.h perf cpumap: Add is_subset function 2022-09-21 07:22:56 +02:00
evlist.h libperf evlist: Add evsel as a parameter to ->idx() 2022-09-21 07:23:04 +02:00
evsel.h perf tools: Add machine_pid and vcpu to id_index 2022-11-14 20:25:45 +01:00
lib.h libperf: Add preadn() 2022-09-21 07:23:07 +02:00
mmap.h perf cpumap: Give CPUs their own type 2022-05-16 11:36:01 +02:00
tests.h libperf tests: Fix verbose printing 2022-04-25 12:33:06 +02:00
threadmap.h
xyarray.h libperf xyarray: Add bounds checks to xyarray__entry() 2021-04-20 08:11:33 -03:00