History

perf tools: Sync addition of PERF_MEM_SNOOPX_PEER

Add a flag to the 'perf mem' data struct to signal that a request caused a cache-to-cache transfer of a line from a peer of the requestor and wasn't sourced from a lower cache level. The line being moved from one peer cache to another has latency and performance implications. On Arm64 Neoverse systems the data source can indicate a cache-to-cache transfer but not if the line is dirty or clean, so instead of overloading HITM define a new flag that indicates this type of transfer. Committer notes: This really is not syncing with the kernel since the patch to the kernel wasn't merged. But we're going ahead of this as it seems trivial and is just a matter of the perf kernel maintainers to give their ack or for us to find another way of expressing this in the perf records synthesized in userspace from the ARM64 hardware traces.

Ali Saidi committed 4 years ago

Commit 2e21bcf1 parent 4a88c4e1 file · +1 −1Browse files

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

Unified · Split

tools/include/uapi/linux/perf_event.h+1−1
@@ -1310,7 +1310,7 @@ union perf_mem_data_src { · 1309 unmodified lines
13101310 #define PERF_MEM_SNOOP_SHIFT 19
13111311
13121312 #define PERF_MEM_SNOOPX_FWD 0x01 /* forward */
1313−/* 1 free */
1313+#define PERF_MEM_SNOOPX_PEER 0x02 /* xfer from peer */
13141314 #define PERF_MEM_SNOOPX_SHIFT 38
13151315
13161316 /* locked instruction */