diff options
author | Namhyung Kim <[email protected]> | 2022-09-16 11:41:30 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2022-09-21 10:30:55 -0300 |
commit | 3da35231d9e4949c4ae40e3ce653e7c468455d55 (patch) | |
tree | 285b1d6a0e0bd881018d62729498bd728d336fed /lib/netdev-notifier-error-inject.c | |
parent | 0d77326c3369e255715ed2440a78894ccc98dd69 (diff) |
perf stat: Fix cpu map index in bperf cgroup code
The previous cpu map introduced a bug in the bperf cgroup counter. This
results in a failure when user gives a partial cpu map starting from
non-zero.
$ sudo ./perf stat -C 1-2 --bpf-counters --for-each-cgroup ^. sleep 1
libbpf: prog 'on_cgrp_switch': failed to create BPF link for perf_event FD 0:
-9 (Bad file descriptor)
Failed to attach cgroup program
To get the FD of an evsel, it should use a map index not the CPU number.
Fixes: 0255571a16059c8e ("perf cpumap: Switch to using perf_cpu_map API")
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: [email protected]
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions