diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-12-11 17:36:09 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-12-13 13:00:09 -0800 |
commit | 783b8f01f5942a786998f5577bd9ff3992f22a1a (patch) | |
tree | 0015cd8dd301c2b5fb8d1224713a4c3c97b42017 /tools/debugging | |
parent | 65bc4c4063ae36223375a920b7d116e54d7def34 (diff) | |
download | linux-783b8f01f5942a786998f5577bd9ff3992f22a1a.tar.gz linux-783b8f01f5942a786998f5577bd9ff3992f22a1a.tar.bz2 linux-783b8f01f5942a786998f5577bd9ff3992f22a1a.zip |
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 <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191212013609.1691168-1-andriin@fb.com
Diffstat (limited to 'tools/debugging')
0 files changed, 0 insertions, 0 deletions