]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
libbpf: Remove sample_period init in perf_buffer
authorTao Chen <chen.dylane@linux.dev>
Wed, 23 Apr 2025 16:39:01 +0000 (00:39 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 25 Apr 2025 16:24:47 +0000 (09:24 -0700)
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 <chen.dylane@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/bpf/20250423163901.2983689-1-chen.dylane@linux.dev
tools/lib/bpf/libbpf.c

index fbb991c6bf19020ace684dd13f620eb147a45a7c..080c699582c79b1a4da78fb0c94f80de55acbee3 100644 (file)
@@ -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;