summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Chen <chen.dylane@linux.dev>2025-04-24 00:39:01 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 15:31:44 +0200
commit30d80c636ec07cb595e190e51a7a9de113ae2b2d (patch)
tree8ce85af377d82c257854e2cab541208fb2e8c369
parent3587bee963f7a92fc2dbce52f7fd4395d8b8934f (diff)
libbpf: Remove sample_period init in perf_buffer
[ Upstream commit 64821d25f05ac468d435e61669ae745ce5a633ea ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--tools/lib/bpf/libbpf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 976fabd5d4db..c6eceae4d6ff 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -13245,7 +13245,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;