Commit 9efa6123 authored by Kajol Jain's avatar Kajol Jain Committed by Xie Haocheng
Browse files

perf: Add mem_hops field in perf_mem_data_src structure

mainline inclusion
from mainline-v5.16-rc1
commit fec9cc61
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I601MP


CVE: NA

--------------------------------

Going forward, future generation systems can have more hierarchy
within the node/package level but currently we don't have any data source
encoding field in perf, which can be used to represent this level of data.

Add a new field called 'mem_hops' in the perf_mem_data_src structure
which can be used to represent intra-node/package or inter-node/off-package
details. This field is of size 3 bits where PERF_MEM_HOPS_{NA, 0..6} value
can be used to present different hop levels data.

Also add corresponding macros to define mem_hop field values
and shift value.

Currently we define macro for HOPS_0 which corresponds
to data coming from another core but same node.

For ex: Encodings for mem_hops fields with L2 cache:

L2			- local L2
L2 | REMOTE | HOPS_0	- remote core, same node L2

Signed-off-by: default avatarKajol Jain <kjain@linux.ibm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20211006140654.298352-3-kjain@linux.ibm.com


Signed-off-by: default avatarXie Haocheng <haocheng.xie@amd.com>
parent c2e4be28
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment