perf dlfilter: Add machine_pid and vcpu

Add machine_pid and vcpu to struct perf_dlfilter_sample. The 'size' can be
used to determine if the values are present, however machine_pid is zero if
unused in any case. vcpu should be ignored if machine_pid is zero.

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-17-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Adrian Hunter
2022-07-11 12:31:59 +03:00
committed by Arnaldo Carvalho de Melo
parent e28fb159f1
commit 2273e46b98
3 changed files with 32 additions and 0 deletions

View File

@@ -9,6 +9,12 @@
#include <linux/perf_event.h>
#include <linux/types.h>
/*
* The following macro can be used to determine if this header defines
* perf_dlfilter_sample machine_pid and vcpu.
*/
#define PERF_DLFILTER_HAS_MACHINE_PID
/* Definitions for perf_dlfilter_sample flags */
enum {
PERF_DLFILTER_FLAG_BRANCH = 1ULL << 0,
@@ -62,6 +68,8 @@ struct perf_dlfilter_sample {
__u64 raw_callchain_nr; /* Number of raw_callchain entries */
const __u64 *raw_callchain; /* Refer <linux/perf_event.h> */
const char *event;
__s32 machine_pid;
__s32 vcpu;
};
/*