aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/perf_buffer.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2019-07-06 18:06:25 +0000
committerDaniel Borkmann <[email protected]>2019-07-08 13:35:43 +0000
commitd7ff34d5fb5a2f6722786863c4afa79c51f8edf2 (patch)
treea3ff890eaa896d7a5da5a87b8cae2f48c7eb184f /tools/testing/selftests/bpf/prog_tests/perf_buffer.c
parentlibbpf: add perf buffer API (diff)
downloadkernel-d7ff34d5fb5a2f6722786863c4afa79c51f8edf2.tar.gz
kernel-d7ff34d5fb5a2f6722786863c4afa79c51f8edf2.zip
libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs
For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of possible CPUs. This is impossible to specify at compilation time. This change adds automatic setting of PERF_EVENT_ARRAY size to number of system CPUs, unless non-zero size is specified explicitly. This allows to adjust size for advanced specific cases, while providing convenient and logical defaults. Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Song Liu <[email protected]> Acked-by: Yonghong Song <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_buffer.c')
0 files changed, 0 insertions, 0 deletions