diff options
| author | Andrii Nakryiko <[email protected]> | 2019-12-11 17:36:09 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2019-12-13 13:00:09 -0800 |
| commit | 783b8f01f5942a786998f5577bd9ff3992f22a1a (patch) | |
| tree | 0015cd8dd301c2b5fb8d1224713a4c3c97b42017 /tools/perf/scripts/python/check-perf-trace.py | |
| parent | 65bc4c4063ae36223375a920b7d116e54d7def34 (diff) | |
libbpf: Don't attach perf_buffer to offline/missing CPUs
It's quite common on some systems to have more CPUs enlisted as "possible",
than there are (and could ever be) present/online CPUs. In such cases,
perf_buffer creationg will fail due to inability to create perf event on
missing CPU with error like this:
libbpf: failed to open perf buffer event on cpu #16: No such device
This patch fixes the logic of perf_buffer__new() to ignore CPUs that are
missing or currently offline. In rare cases where user explicitly listed
specific CPUs to connect to, behavior is unchanged: libbpf will try to open
perf event buffer on specified CPU(s) anyways.
Fixes: fb84b8224655 ("libbpf: add perf buffer API")
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions