linux-stable/tools/include
Kajol Jain 7fbddf40b8 tools headers UAPI: Add new macros for mem_hops field to perf_event.h
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

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lore.kernel.org/lkml/20211206091749.87585-3-kjain@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-12-22 09:34:43 -03:00
..
asm tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' 2021-05-10 09:01:00 -03:00
asm-generic x86/insn: Use get_unaligned() instead of memcpy() 2021-10-06 11:56:37 +02:00
linux tools/lib/lockdep: drop leftover liblockdep headers 2021-12-09 09:37:49 -08:00
nolibc tools/nolibc: Implement msleep() 2021-07-20 13:42:26 -07:00
tools tools: bpf: fix license for a compat header file 2018-09-19 23:49:58 +02:00
trace/events
uapi tools headers UAPI: Add new macros for mem_hops field to perf_event.h 2021-12-22 09:34:43 -03:00
vdso tools headers: Synchronize linux/bits.h with the kernel sources 2020-04-14 11:40:05 -03:00