• Thomas Richter's avatar
    perf report: Dump s390 counter set data to file · 8dabe9c4
    Thomas Richter authored
    Add support for the new s390 PMU device cpum_cf_diag to extract the
    counter set diagnostic data. This data is available as event raw data
    and can be created with this command:
    
      [root@s35lp76 perf]# ./perf record -R -e '{rbd000,rbc000}' --
                                     ~/mytests/facultaet 2500
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.009 MB perf.data ]
      [root@s35lp76 perf]#
    
    The new event 0xbc000 generated this counter set diagnostic trace data.
    The data can be extracted using command:
    
      [root@s35lp76 perf]# ./perf report --stdio --itrace=d
      #
      # Total Lost Samples: 0
      #
      # Samples: 21  of events 'anon group { rbd000, rbc000 }'
      # Event count (approx.): 21
      #
      #         Overhead  Command    Shared Object      Symbol
      # ................  .........  .................  ........................
      #
        80.95%   0.00%  facultaet  facultaet          [.] facultaet
         4.76%   0.00%  facultaet  [kernel.kallsyms]  [k] check_chain_key
         4.76%   0.00%  facultaet  [kernel.kallsyms]  [k] ftrace_likely_update
         4.76%   0.00%  facultaet  [kernel.kallsyms]  [k] lock_release
         4.76%   0.00%  facultaet  libc-2.26.so       [.] _dl_addr
      [root@s35lp76 perf]# ll aux*
      -rw-r--r-- 1 root root 3408 Oct 16 12:40 aux.ctr.02
      -rw-r--r-- 1 root root 4096 Oct 16 12:40 aux.smp.02
      [root@s35lp76 perf]#
    
    The files named aux.ctr.## contain the counter set diagnostic data and
    the files named aux.smp.## contain the sampling diagnostic data. ##
    stand for the CPU number the data was taken from.
    Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
    Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Link: http://lkml.kernel.org/r/20190117093003.96287-4-tmricht@linux.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    8dabe9c4
s390-cpumsf.c 31.6 KB