]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tools headers UAPI: Sync linux/perf_event.h with the kernel sources
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 21 May 2021 19:00:31 +0000 (16:00 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Oct 2022 13:45:16 +0000 (10:45 -0300)
To pick the changes in:

  017c42faf9a78aeb ("perf/uapi: Define PERF_MEM_SNOOPX_PEER in kernel header file")
  4fe1f9ed6199178f ("perf/mem: Introduce PERF_MEM_LVLNUM_{EXTN_MEM|IO}")
  7c0deaac8ddfc6d3 ("perf: Kill __PERF_SAMPLE_CALLCHAIN_EARLY")

There is a kernel patch pending that renames PERF_MEM_LVLNUM_EXTN_MEM to
PERF_MEM_LVLNUM_CXL, tooling this time is ahead of the kernel :-)

This thus partially addresses this perf build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h'
  diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/lkml/Y1k53KMdzypmU0WS@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/uapi/linux/perf_event.h

index ea6defacc1a7d22d4fafdc1fb95d732054f158b1..ccb7f5dad59be96b2cba0011717759ff8e67c640 100644 (file)
@@ -164,8 +164,6 @@ enum perf_event_sample_format {
        PERF_SAMPLE_WEIGHT_STRUCT               = 1U << 24,
 
        PERF_SAMPLE_MAX = 1U << 25,             /* non-ABI */
-
-       __PERF_SAMPLE_CALLCHAIN_EARLY           = 1ULL << 63, /* non-ABI; internal use */
 };
 
 #define PERF_SAMPLE_WEIGHT_TYPE        (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT)
@@ -263,6 +261,17 @@ enum {
        PERF_BR_MAX,
 };
 
+/*
+ * Common branch speculation outcome classification
+ */
+enum {
+       PERF_BR_SPEC_NA                 = 0,    /* Not available */
+       PERF_BR_SPEC_WRONG_PATH         = 1,    /* Speculative but on wrong path */
+       PERF_BR_NON_SPEC_CORRECT_PATH   = 2,    /* Non-speculative but on correct path */
+       PERF_BR_SPEC_CORRECT_PATH       = 3,    /* Speculative and on correct path */
+       PERF_BR_SPEC_MAX,
+};
+
 enum {
        PERF_BR_NEW_FAULT_ALGN          = 0,    /* Alignment fault */
        PERF_BR_NEW_FAULT_DATA          = 1,    /* Data fault */
@@ -282,11 +291,11 @@ enum {
        PERF_BR_PRIV_HV         = 3,
 };
 
-#define PERF_BR_ARM64_FIQ              PERF_BR_NEW_ARCH_1
-#define PERF_BR_ARM64_DEBUG_HALT       PERF_BR_NEW_ARCH_2
-#define PERF_BR_ARM64_DEBUG_EXIT       PERF_BR_NEW_ARCH_3
-#define PERF_BR_ARM64_DEBUG_INST       PERF_BR_NEW_ARCH_4
-#define PERF_BR_ARM64_DEBUG_DATA       PERF_BR_NEW_ARCH_5
+#define PERF_BR_ARM64_FIQ              PERF_BR_NEW_ARCH_1
+#define PERF_BR_ARM64_DEBUG_HALT       PERF_BR_NEW_ARCH_2
+#define PERF_BR_ARM64_DEBUG_EXIT       PERF_BR_NEW_ARCH_3
+#define PERF_BR_ARM64_DEBUG_INST       PERF_BR_NEW_ARCH_4
+#define PERF_BR_ARM64_DEBUG_DATA       PERF_BR_NEW_ARCH_5
 
 #define PERF_SAMPLE_BRANCH_PLM_ALL \
        (PERF_SAMPLE_BRANCH_USER|\
@@ -1397,6 +1406,7 @@ union perf_mem_data_src {
  *     abort: aborting a hardware transaction
  *    cycles: cycles from last branch (or 0 if not supported)
  *      type: branch type
+ *      spec: branch speculation info (or 0 if not supported)
  */
 struct perf_branch_entry {
        __u64   from;
@@ -1407,9 +1417,10 @@ struct perf_branch_entry {
                abort:1,    /* transaction abort */
                cycles:16,  /* cycle count to last branch */
                type:4,     /* branch type */
+               spec:2,     /* branch speculation info */
                new_type:4, /* additional branch type */
                priv:3,     /* privilege level */
-               reserved:33;
+               reserved:31;
 };
 
 union perf_sample_weight {