mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 10:01:41 +00:00
f0fdfefb2d
The program and map iterators work similar to seq_file-s. Once the program is pinned in bpffs it can be read with "cat" tool to print human readable output. In this case about BPF programs and maps. For example: $ cat /sys/fs/bpf/progs.debug id name attached 5 dump_bpf_map bpf_iter_bpf_map 6 dump_bpf_prog bpf_iter_bpf_prog $ cat /sys/fs/bpf/maps.debug id name max_entries 3 iterator.rodata 1 To avoid kernel build dependency on clang 10 separate bpf skeleton generation into manual "make" step and instead check-in generated .skel.h into git. Unlike 'bpftool prog show' in-kernel BTF name is used (when available) to print full name of BPF program instead of 16-byte truncated name. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200819042759.51280-3-alexei.starovoitov@gmail.com
5 lines
180 B
Plaintext
5 lines
180 B
Plaintext
WARNING:
|
|
If you change "iterators.bpf.c" do "make -j" in this directory to rebuild "iterators.skel.h".
|
|
Make sure to have clang 10 installed.
|
|
See Documentation/bpf/bpf_devel_QA.rst
|