OSDN Git Service

tools/bpf: Add runqslower tool to tools/bpf
authorAndrii Nakryiko <andriin@fb.com>
Mon, 13 Jan 2020 07:31:42 +0000 (23:31 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 14 Jan 2020 01:48:13 +0000 (17:48 -0800)
commit9c01546d26d28cf57341d8380ba900bf68e26b18
tree06640835fe8f1d79e93687db289bcf8451548380
parent1cf5b23988ea0086a252a5c8b005b075f1e9b030
tools/bpf: Add runqslower tool to tools/bpf

Convert one of BCC tools (runqslower [0]) to BPF CO-RE + libbpf. It matches
its BCC-based counterpart 1-to-1, supporting all the same parameters and
functionality.

runqslower tool utilizes BPF skeleton, auto-generated from BPF object file,
as well as memory-mapped interface to global (read-only, in this case) data.
Its Makefile also ensures auto-generation of "relocatable" vmlinux.h, which is
necessary for BTF-typed raw tracepoints with direct memory access.

  [0] https://github.com/iovisor/bcc/blob/11bf5d02c895df9646c117c713082eb192825293/tools/runqslower.py

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200113073143.1779940-6-andriin@fb.com
tools/bpf/Makefile
tools/bpf/runqslower/.gitignore [new file with mode: 0644]
tools/bpf/runqslower/Makefile [new file with mode: 0644]
tools/bpf/runqslower/runqslower.bpf.c [new file with mode: 0644]
tools/bpf/runqslower/runqslower.c [new file with mode: 0644]
tools/bpf/runqslower/runqslower.h [new file with mode: 0644]