linux-yocto/tools/perf/pmu-events/arch/s390
Thomas Richter c2f3d7dfc7 perf stat: Do not fail on metrics on s390 z/VM systems
On s390 z/VM virtual machines command 'perf list' also displays metrics:

  # perf list | grep -A 20 'Metric Groups:'
  Metric Groups:

  No_group:
   cpi
        [Cycles per Instruction]
   est_cpi
        [Estimated Instruction Complexity CPI infinite Level 1]
   finite_cpi
        [Cycles per Instructions from Finite cache/memory]
   l1mp
        [Level One Miss per 100 Instructions]
   l2p
        [Percentage sourced from Level 2 cache]
   l3p
        [Percentage sourced from Level 3 on same chip cache]
   l4lp
        [Percentage sourced from Level 4 Local cache on same book]
   l4rp
        [Percentage sourced from Level 4 Remote cache on different book]
   memp
        [Percentage sourced from memory]
   ....
  #

The command

  # perf stat -M cpi -- true
  event syntax error: '{CPU_CYCLES/metric-id=CPU_CYCLES/.....'
                        \___ Bad event or PMU

  Unable to find PMU or event on a PMU of 'CPU_CYCLES'

   event syntax error: '{CPU_CYCLES/metric-id=CPU_CYCLES/...'
                        \___ Cannot find PMU `CPU_CYCLES'.
                             Missing kernel support?
 #

fails. 'perf stat' should not fail on metrics when the referenced CPU
Counter Measurement PMU is not available.

Output after:

  # perf stat -M est_cpi -- sleep 1

  Performance counter stats for 'sleep 1':

     1,000,887,494 ns   duration_time   #     0.00 est_cpi

       1.000887494 seconds time elapsed

       0.000143000 seconds user
       0.000662000 seconds sys

 #

Fixes: 7f76b31130 ("perf list: Add IBM z16 event description for s390")
Suggested-by: Ian Rogers <irogers@google.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: https://lore.kernel.org/r/20240404064806.1362876-2-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-04-04 18:10:11 -03:00
..
cf_z10 perf list: Update event description for IBM z10 to latest level 2022-06-03 21:37:26 +02:00
cf_z13 perf vendor events s390: Add metric for TLB and cache 2023-03-14 18:36:08 -03:00
cf_z14 perf vendor events s390: Add metric for TLB and cache 2023-03-14 18:36:08 -03:00
cf_z15 perf vendor events s390: Add metric for TLB and cache 2023-03-14 18:36:08 -03:00
cf_z16 perf stat: Do not fail on metrics on s390 z/VM systems 2024-04-04 18:10:11 -03:00
cf_z196 perf list: Update event description for IBM z196/z114 to latest level 2022-06-03 21:37:27 +02:00
cf_zec12 perf list: Update event description for IBM zEC12/zBC12 to latest level 2022-06-03 21:37:27 +02:00
mapfile.csv perf report: Fix PAI counter names for s390 virtual machines 2024-04-04 18:08:21 -03:00