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
This commit is contained in:
parent
60ba87bb6b
commit
eda8bfa5b7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user