Commit eda8bfa5 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

tools/runqslower: Update perf_buffer__new() calls

Use v1.0+ compatible variant of perf_buffer__new() call to prepare for
deprecation.
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211111053624.190580-9-andrii@kernel.org
parent 60ba87bb
...@@ -123,7 +123,6 @@ int main(int argc, char **argv) ...@@ -123,7 +123,6 @@ int main(int argc, char **argv)
.parser = parse_arg, .parser = parse_arg,
.doc = argp_program_doc, .doc = argp_program_doc,
}; };
struct perf_buffer_opts pb_opts;
struct perf_buffer *pb = NULL; struct perf_buffer *pb = NULL;
struct runqslower_bpf *obj; struct runqslower_bpf *obj;
int err; int err;
...@@ -165,9 +164,8 @@ int main(int argc, char **argv) ...@@ -165,9 +164,8 @@ int main(int argc, char **argv)
printf("Tracing run queue latency higher than %llu us\n", env.min_us); printf("Tracing run queue latency higher than %llu us\n", env.min_us);
printf("%-8s %-16s %-6s %14s\n", "TIME", "COMM", "PID", "LAT(us)"); printf("%-8s %-16s %-6s %14s\n", "TIME", "COMM", "PID", "LAT(us)");
pb_opts.sample_cb = handle_event; pb = perf_buffer__new(bpf_map__fd(obj->maps.events), 64,
pb_opts.lost_cb = handle_lost_events; handle_event, handle_lost_events, NULL, NULL);
pb = perf_buffer__new(bpf_map__fd(obj->maps.events), 64, &pb_opts);
err = libbpf_get_error(pb); err = libbpf_get_error(pb);
if (err) { if (err) {
pb = NULL; pb = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment