summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-11-10 21:36:23 -0800
committerAlexei Starovoitov <ast@kernel.org>2021-11-11 16:54:06 -0800
commiteda8bfa5b7c76d332ece1f24a3662ca843fd880a (patch)
tree29189ff6e9c04d0f1de61d78fa1c2d89509e1b97 /tools/bpf
parent60ba87bb6bafaaa6e8ef9a73834cf701194d1923 (diff)
downloadlinux-eda8bfa5b7c76d332ece1f24a3662ca843fd880a.tar.gz
linux-eda8bfa5b7c76d332ece1f24a3662ca843fd880a.tar.bz2
linux-eda8bfa5b7c76d332ece1f24a3662ca843fd880a.zip
tools/runqslower: Update perf_buffer__new() calls
Use v1.0+ compatible variant of perf_buffer__new() call to prepare for deprecation. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211111053624.190580-9-andrii@kernel.org
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/runqslower/runqslower.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/bpf/runqslower/runqslower.c b/tools/bpf/runqslower/runqslower.c
index d89715844952..2414cc764461 100644
--- a/tools/bpf/runqslower/runqslower.c
+++ b/tools/bpf/runqslower/runqslower.c
@@ -123,7 +123,6 @@ int main(int argc, char **argv)
.parser = parse_arg,
.doc = argp_program_doc,
};
- struct perf_buffer_opts pb_opts;
struct perf_buffer *pb = NULL;
struct runqslower_bpf *obj;
int err;
@@ -165,9 +164,8 @@ int main(int argc, char **argv)
printf("Tracing run queue latency higher than %llu us\n", env.min_us);
printf("%-8s %-16s %-6s %14s\n", "TIME", "COMM", "PID", "LAT(us)");
- pb_opts.sample_cb = handle_event;
- pb_opts.lost_cb = handle_lost_events;
- pb = perf_buffer__new(bpf_map__fd(obj->maps.events), 64, &pb_opts);
+ pb = perf_buffer__new(bpf_map__fd(obj->maps.events), 64,
+ handle_event, handle_lost_events, NULL, NULL);
err = libbpf_get_error(pb);
if (err) {
pb = NULL;