libbpf-tools: update runqlat for libbpf 1.0
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 17 Dec 2021 22:32:30 +0000 (14:32 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 20 Dec 2021 21:21:26 +0000 (13:21 -0800)
Switch to libbpf 1.0 mode and adapt libbpf API usage accordingly.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
libbpf-tools/runqlat.c

index bfa79ef..bcccf0d 100644 (file)
@@ -194,14 +194,9 @@ int main(int argc, char **argv)
                return 1;
        }
 
+       libbpf_set_strict_mode(LIBBPF_STRICT_ALL);
        libbpf_set_print(libbpf_print_fn);
 
-       err = bump_memlock_rlimit();
-       if (err) {
-               fprintf(stderr, "failed to increase rlimit: %d\n", err);
-               return 1;
-       }
-
        obj = runqlat_bpf__open();
        if (!obj) {
                fprintf(stderr, "failed to open BPF object\n");