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. Also add corresponding strings in the mem_hops array to represent mem_hop field data in perf_mem__lvl_scnprintf function Incase mem_hops field is used, PERF_MEM_LVLNUM field also need to be set inorder to represent the data source. Hence printing data source via PERF_MEM_LVL field can be skip in that scenario. 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
Showing the changes to tools/include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -1332,7 +1332,10 @@ union perf_mem_data_src { · 1331 unmodified lines | ||
| 1332 | 1332 | |
| 1333 | 1333 | /* hop level */ |
| 1334 | 1334 | #define PERF_MEM_HOPS_0 0x01 /* remote core, same node */ |
| 1335 | −/* 2-7 available */ | |
| 1335 | +#define PERF_MEM_HOPS_1 0x02 /* remote node, same socket */ | |
| 1336 | +#define PERF_MEM_HOPS_2 0x03 /* remote socket, same board */ | |
| 1337 | +#define PERF_MEM_HOPS_3 0x04 /* remote board */ | |
| 1338 | +/* 5-7 available */ | |
| 1336 | 1339 | #define PERF_MEM_HOPS_SHIFT 43 |
| 1337 | 1340 | |
| 1338 | 1341 | #define PERF_MEM_S(a, s) \ |