History

tools headers uapi: Update tools's copy of linux/perf_event.h

To get the changes in these csets: 2a6c6b7d7ad346f0 ("perf/core: Add PERF_SAMPLE_WEIGHT_STRUCT") 61b985e3e775a3a7 ("perf/x86/intel: Add perf core PMU support for Sapphire Rapids") This cures the following warning during perf's build: 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 Committer notes: Picked by hand as I had already merged the MMAP buildid patch that also touches perf_event.h and is also only in {acme,tip}/perf/core, not yet upstream.

Kan Liang committed 5 years ago

Commit 81898ef1 parent 068aeea1 file · +50 −4Browse files

Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all

Unified · Split

tools/include/uapi/linux/perf_event.h+50−4
@@ -145,12 +145,14 @@ enum perf_event_sample_format { · 144 unmodified lines
145 PERF_SAMPLE_CGROUP = 1U << 21,145 PERF_SAMPLE_CGROUP = 1U << 21,
146 PERF_SAMPLE_DATA_PAGE_SIZE = 1U << 22,146 PERF_SAMPLE_DATA_PAGE_SIZE = 1U << 22,
147 PERF_SAMPLE_CODE_PAGE_SIZE = 1U << 23,147 PERF_SAMPLE_CODE_PAGE_SIZE = 1U << 23,
148 PERF_SAMPLE_WEIGHT_STRUCT = 1U << 24,
148 149
149 PERF_SAMPLE_MAX = 1U << 24, /* non-ABI */150 PERF_SAMPLE_MAX = 1U << 25, /* non-ABI */
150 151
151 __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */152 __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */
152};153};
153 154
155#define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT)
154/*156/*
155 * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set157 * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set
156 *158 *
@@ -912,7 +914,24 @@ enum perf_event_type { · 755 unmodified lines
912 * char data[size];914 * char data[size];
913 * u64 dyn_size; } && PERF_SAMPLE_STACK_USER915 * u64 dyn_size; } && PERF_SAMPLE_STACK_USER
914 *916 *
915 * { u64 weight; } && PERF_SAMPLE_WEIGHT917 * { union perf_sample_weight
918 * {
919 * u64 full; && PERF_SAMPLE_WEIGHT
920 * #if defined(__LITTLE_ENDIAN_BITFIELD)
921 * struct {
922 * u32 var1_dw;
923 * u16 var2_w;
924 * u16 var3_w;
925 * } && PERF_SAMPLE_WEIGHT_STRUCT
926 * #elif defined(__BIG_ENDIAN_BITFIELD)
927 * struct {
928 * u16 var3_w;
929 * u16 var2_w;
930 * u32 var1_dw;
931 * } && PERF_SAMPLE_WEIGHT_STRUCT
932 * #endif
933 * }
934 * }
916 * { u64 data_src; } && PERF_SAMPLE_DATA_SRC935 * { u64 data_src; } && PERF_SAMPLE_DATA_SRC
917 * { u64 transaction; } && PERF_SAMPLE_TRANSACTION936 * { u64 transaction; } && PERF_SAMPLE_TRANSACTION
918 * { u64 abi; # enum perf_sample_regs_abi937 * { u64 abi; # enum perf_sample_regs_abi
@@ -1159,14 +1178,16 @@ union perf_mem_data_src { · 240 unmodified lines
1159 mem_lvl_num:4, /* memory hierarchy level number */1178 mem_lvl_num:4, /* memory hierarchy level number */
1160 mem_remote:1, /* remote */1179 mem_remote:1, /* remote */
1161 mem_snoopx:2, /* snoop mode, ext */1180 mem_snoopx:2, /* snoop mode, ext */
1162 mem_rsvd:24;1181 mem_blk:3, /* access blocked */
1182 mem_rsvd:21;
1163 };1183 };
1164};1184};
1165#elif defined(__BIG_ENDIAN_BITFIELD)1185#elif defined(__BIG_ENDIAN_BITFIELD)
1166union perf_mem_data_src {1186union perf_mem_data_src {
1167 __u64 val;1187 __u64 val;
1168 struct {1188 struct {
1169 __u64 mem_rsvd:24,1189 __u64 mem_rsvd:21,
1190 mem_blk:3, /* access blocked */
1170 mem_snoopx:2, /* snoop mode, ext */1191 mem_snoopx:2, /* snoop mode, ext */
1171 mem_remote:1, /* remote */1192 mem_remote:1, /* remote */
1172 mem_lvl_num:4, /* memory hierarchy level number */1193 mem_lvl_num:4, /* memory hierarchy level number */
@@ -1249,6 +1270,12 @@ union perf_mem_data_src { · 76 unmodified lines
1249#define PERF_MEM_TLB_OS 0x40 /* OS fault handler */1270#define PERF_MEM_TLB_OS 0x40 /* OS fault handler */
1250#define PERF_MEM_TLB_SHIFT 261271#define PERF_MEM_TLB_SHIFT 26
1251 1272
1273/* Access blocked */
1274#define PERF_MEM_BLK_NA 0x01 /* not available */
1275#define PERF_MEM_BLK_DATA 0x02 /* data could not be forwarded */
1276#define PERF_MEM_BLK_ADDR 0x04 /* address conflict */
1277#define PERF_MEM_BLK_SHIFT 40
1278
1252#define PERF_MEM_S(a, s) \1279#define PERF_MEM_S(a, s) \
1253 (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)1280 (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
1254 1281
@@ -1280,4 +1307,23 @@ struct perf_branch_entry { · 25 unmodified lines
1280 reserved:40;1307 reserved:40;
1281};1308};
1282 1309
1310union perf_sample_weight {
1311 __u64 full;
1312#if defined(__LITTLE_ENDIAN_BITFIELD)
1313 struct {
1314 __u32 var1_dw;
1315 __u16 var2_w;
1316 __u16 var3_w;
1317 };
1318#elif defined(__BIG_ENDIAN_BITFIELD)
1319 struct {
1320 __u16 var3_w;
1321 __u16 var2_w;
1322 __u32 var1_dw;
1323 };
1324#else
1325#error "Unknown endianness"
1326#endif
1327};
1328
1283#endif /* _UAPI_LINUX_PERF_EVENT_H */1329#endif /* _UAPI_LINUX_PERF_EVENT_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t