Skip to content

Commit 831c05a

Browse files
committed
tools headers UAPI: Sync linux/perf_event.h with the kernel sources
To pick the changes in: cfef80b ("perf/uapi: Define PERF_MEM_SNOOPX_PEER in kernel header file") ee3e88d ("perf/mem: Introduce PERF_MEM_LVLNUM_{EXTN_MEM|IO}") b4e12b2 ("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 <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ravi Bangoria <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 74455fd commit 831c05a

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

tools/include/uapi/linux/perf_event.h

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ enum perf_event_sample_format {
164164
PERF_SAMPLE_WEIGHT_STRUCT = 1U << 24,
165165

166166
PERF_SAMPLE_MAX = 1U << 25, /* non-ABI */
167-
168-
__PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */
169167
};
170168

171169
#define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT)
@@ -263,6 +261,17 @@ enum {
263261
PERF_BR_MAX,
264262
};
265263

264+
/*
265+
* Common branch speculation outcome classification
266+
*/
267+
enum {
268+
PERF_BR_SPEC_NA = 0, /* Not available */
269+
PERF_BR_SPEC_WRONG_PATH = 1, /* Speculative but on wrong path */
270+
PERF_BR_NON_SPEC_CORRECT_PATH = 2, /* Non-speculative but on correct path */
271+
PERF_BR_SPEC_CORRECT_PATH = 3, /* Speculative and on correct path */
272+
PERF_BR_SPEC_MAX,
273+
};
274+
266275
enum {
267276
PERF_BR_NEW_FAULT_ALGN = 0, /* Alignment fault */
268277
PERF_BR_NEW_FAULT_DATA = 1, /* Data fault */
@@ -282,11 +291,11 @@ enum {
282291
PERF_BR_PRIV_HV = 3,
283292
};
284293

285-
#define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1
286-
#define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2
287-
#define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3
288-
#define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4
289-
#define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5
294+
#define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1
295+
#define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2
296+
#define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3
297+
#define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4
298+
#define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5
290299

291300
#define PERF_SAMPLE_BRANCH_PLM_ALL \
292301
(PERF_SAMPLE_BRANCH_USER|\
@@ -1397,6 +1406,7 @@ union perf_mem_data_src {
13971406
* abort: aborting a hardware transaction
13981407
* cycles: cycles from last branch (or 0 if not supported)
13991408
* type: branch type
1409+
* spec: branch speculation info (or 0 if not supported)
14001410
*/
14011411
struct perf_branch_entry {
14021412
__u64 from;
@@ -1407,9 +1417,10 @@ struct perf_branch_entry {
14071417
abort:1, /* transaction abort */
14081418
cycles:16, /* cycle count to last branch */
14091419
type:4, /* branch type */
1420+
spec:2, /* branch speculation info */
14101421
new_type:4, /* additional branch type */
14111422
priv:3, /* privilege level */
1412-
reserved:33;
1423+
reserved:31;
14131424
};
14141425

14151426
union perf_sample_weight {

0 commit comments

Comments
 (0)