perf vendor events s390: Add cache metrics for z14
authorThomas Richter <tmricht@linux.ibm.com>
Mon, 13 Mar 2023 08:01:59 +0000 (09:01 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Mar 2023 21:35:54 +0000 (18:35 -0300)
commitadd7894a25d1c572b2e472557f2b1150dbc991ee
tree898d06e86409e9d635ed020d2c40d62fb2a13e3e
parentbdecfecac8aba6ca5e2fde8f09b4fba1d1326997
perf vendor events s390: Add cache metrics for z14

Add metrics for s390 z14

- Percentage sourced from Level 2 cache
- Percentage sourced from Level 3 on same chip cache
- Percentage sourced from Level 4 Local cache on same book
- Percentage sourced from Level 4 Remote cache on different book
- Percentage sourced from memory

For details about the formulas see this documentation:

  https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf

Output after:

  # ./perf stat -M l4rp -- find /
  .... find output deleted

  Performance counter stats for 'find /':

             0      L1I_OFFDRAWER_L4_SOURCED_WRITES  #     0.01 l4rp
            84      L1D_OFFDRAWER_L4_SOURCED_WRITES
             0      L1I_OFFDRAWER_L3_SOURCED_WRITES
    71,535,353      L1I_DIR_WRITES
           219      L1D_OFFDRAWER_L3_SOURCED_WRITES
        16,436      L1D_OFFDRAWER_L3_SOURCED_WRITES_IV
             0      L1I_OFFDRAWER_L3_SOURCED_WRITES_IV
    46,343,940      L1D_DIR_WRITES

  10.530805537 seconds time elapsed

   0.774396000 seconds user
   1.602714000 seconds sys

  #

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Acked-By: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: https://lore.kernel.org/r/20230313080201.2440201-3-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/pmu-events/arch/s390/cf_z14/transaction.json