1. 26 Sep, 2022 2 commits
    • Zhengjun Xing's avatar
      perf print-events: Fix "perf list" can not display the PMU prefix for some hybrid cache events · e28c0787
      Zhengjun Xing authored
      Some hybrid hardware cache events are only available on one CPU PMU. For
      example, 'L1-dcache-load-misses' is only available on cpu_core.
      
      We have supported in the perf list clearly reporting this info, the
      function works fine before but recently the argument "config" in API
      is_event_supported() is changed from "u64" to "unsigned int" which
      caused a regression, the "perf list" then can not display the PMU prefix
      for some hybrid cache events.
      
      For the hybrid systems, the PMU type ID is stored at config[63:32],
      define config to "unsigned int" will miss the PMU type ID information,
      then the regression happened, the config should be defined as "u64".
      
      Before:
       # ./perf list |grep "Hardware cache event"
        L1-dcache-load-misses                              [Hardware cache event]
        L1-dcache-loads                                    [Hardware cache event]
        L1-dcache-stores                                   [Hardware cache event]
        L1-icache-load-misses                              [Hardware cache event]
        L1-icache-loads                                    [Hardware cache event]
        LLC-load-misses                                    [Hardware cache event]
        LLC-loads                                          [Hardware cache event]
        LLC-store-misses                                   [Hardware cache event]
        LLC-stores                                         [Hardware cache event]
        branch-load-misses                                 [Hardware cache event]
        branch-loads                                       [Hardware cache event]
        dTLB-load-misses                                   [Hardware cache event]
        dTLB-loads                                         [Hardware cache event]
        dTLB-store-misses                                  [Hardware cache event]
        dTLB-stores                                        [Hardware cache event]
        iTLB-load-misses                                   [Hardware cache event]
        node-load-misses                                   [Hardware cache event]
        node-loads                                         [Hardware cache event]
      
      After:
       # ./perf list |grep "Hardware cache event"
        L1-dcache-loads                                    [Hardware cache event]
        L1-dcache-stores                                   [Hardware cache event]
        L1-icache-load-misses                              [Hardware cache event]
        LLC-load-misses                                    [Hardware cache event]
        LLC-loads                                          [Hardware cache event]
        LLC-store-misses                                   [Hardware cache event]
        LLC-stores                                         [Hardware cache event]
        branch-load-misses                                 [Hardware cache event]
        branch-loads                                       [Hardware cache event]
        cpu_atom/L1-icache-loads/                          [Hardware cache event]
        cpu_core/L1-dcache-load-misses/                    [Hardware cache event]
        cpu_core/node-load-misses/                         [Hardware cache event]
        cpu_core/node-loads/                               [Hardware cache event]
        dTLB-load-misses                                   [Hardware cache event]
        dTLB-loads                                         [Hardware cache event]
        dTLB-store-misses                                  [Hardware cache event]
        dTLB-stores                                        [Hardware cache event]
        iTLB-load-misses                                   [Hardware cache event]
      
      Fixes: 9b7c7728 ("perf parse-events: Break out tracepoint and printing")
      Reported-by: default avatarYi Ammy <ammy.yi@intel.com>
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarXing Zhengjun <zhengjun.xing@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220923030013.3726410-1-zhengjun.xing@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e28c0787
    • Namhyung Kim's avatar
      perf tools: Get a perf cgroup more portably in BPF · e42c9c54
      Namhyung Kim authored
      The perf_event_cgrp_id can be different on other configurations.
      
      To be more portable as CO-RE, it needs to get the cgroup subsys id using
      the bpf_core_enum_value() helper.
      Suggested-by: default avatarIan Rogers <irogers@google.com>
      Reviewed-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220923063205.772936-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e42c9c54
  2. 25 Sep, 2022 8 commits
  3. 24 Sep, 2022 10 commits
  4. 23 Sep, 2022 18 commits
  5. 22 Sep, 2022 2 commits