Skip to content

Commit 2e21bcf

Browse files
AGSaidiacmel
authored andcommitted
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. Reviewed-by: Leo Yan <[email protected]> Signed-off-by: Ali Saidi <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Anshuman Khandual <[email protected]> Cc: German Gomez <[email protected]> Cc: Gustavo A. R. Silva <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Like Xu <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Timothy Hayes <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leo Yan <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 4a88c4e commit 2e21bcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/include/uapi/linux/perf_event.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ union perf_mem_data_src {
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 */

0 commit comments

Comments
 (0)