From: Tao Chen Date: Wed, 23 Apr 2025 16:39:01 +0000 (+0800) Subject: libbpf: Remove sample_period init in perf_buffer X-Git-Tag: v6.16-rc1~131^2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64821d25f05ac468d435e61669ae745ce5a633ea;p=thirdparty%2Fkernel%2Flinux.git libbpf: Remove sample_period init in perf_buffer It seems that sample_period is not used in perf buffer. Actually, only wakeup_events are meaningful to enable events aggregation for wakeup notification. Remove sample_period setting code to avoid confusion. Fixes: fb84b8224655 ("libbpf: add perf buffer API") Signed-off-by: Tao Chen Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Namhyung Kim Link: https://lore.kernel.org/bpf/20250423163901.2983689-1-chen.dylane@linux.dev --- diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index fbb991c6bf190..080c699582c79 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -13375,7 +13375,6 @@ struct perf_buffer *perf_buffer__new(int map_fd, size_t page_cnt, attr.config = PERF_COUNT_SW_BPF_OUTPUT; attr.type = PERF_TYPE_SOFTWARE; attr.sample_type = PERF_SAMPLE_RAW; - attr.sample_period = sample_period; attr.wakeup_events = sample_period; p.attr = &attr;