aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKajol Jain <kjain@linux.ibm.com>2021-12-06 14:47:46 +0530
committerAndrii Nakryiko <andrii.nakryiko@gmail.com>2022-01-25 23:37:04 -0800
commitda06e3efcc3c00f103600ff8282edcab18d68e13 (patch)
treebf1638f5ff139eb237d5fc5f7ad49292b05cd9cb /include
parentb4b6e4dc20f02440df4a937f6ab48809d8136e7f (diff)
downloadlibbpf-da06e3efcc3c00f103600ff8282edcab18d68e13.tar.gz
perf: Add new macros for mem_hops field
Add new macros for mem_hops field which can be used to represent remote-node, socket and board level details. Currently the code had macro for HOPS_0, which corresponds to data coming from another core but same node. Add new macros for HOPS_1 to HOPS_3 to represent remote-node, socket and board level data. For ex: Encodings for mem_hops fields with L2 cache: L2 - local L2 L2 | REMOTE | HOPS_0 - remote core, same node L2 L2 | REMOTE | HOPS_1 - remote node, same socket L2 L2 | REMOTE | HOPS_2 - remote socket, same board L2 L2 | REMOTE | HOPS_3 - remote board L2 Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211206091749.87585-2-kjain@linux.ibm.com
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/perf_event.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index bd8860e..1b65042 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -1332,7 +1332,10 @@ union perf_mem_data_src {
/* hop level */
#define PERF_MEM_HOPS_0 0x01 /* remote core, same node */
-/* 2-7 available */
+#define PERF_MEM_HOPS_1 0x02 /* remote node, same socket */
+#define PERF_MEM_HOPS_2 0x03 /* remote socket, same board */
+#define PERF_MEM_HOPS_3 0x04 /* remote board */
+/* 5-7 available */
#define PERF_MEM_HOPS_SHIFT 43
#define PERF_MEM_S(a, s) \