diff options
author | Quentin Monnet <quentin@isovalent.com> | 2020-09-09 19:24:58 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-10 21:16:46 +0300 |
commit | 82b8cf0acc7bfe7b247e5ddc4417f6146d74c0b8 (patch) | |
tree | addb627b4603963a8f4bfbaac7cf19483fbede1a /tools/bpf/bpftool/Documentation/bpftool-iter.rst | |
parent | 41d5c37b74084b44ccc688dbab508acb5fdddc48 (diff) | |
download | linux-82b8cf0acc7bfe7b247e5ddc4417f6146d74c0b8.tar.xz |
tools: bpftool: Print optional built-in features along with version
Bpftool has a number of features that can be included or left aside
during compilation. This includes:
- Support for libbfd, providing the disassembler for JIT-compiled
programs.
- Support for BPF skeletons, used for profiling programs or iterating on
the PIDs of processes associated with BPF objects.
In order to make it easy for users to understand what features were
compiled for a given bpftool binary, print the status of the two
features above when showing the version number for bpftool ("bpftool -V"
or "bpftool version"). Document this in the main manual page. Example
invocations:
$ bpftool version
./bpftool v5.9.0-rc1
features: libbfd, skeletons
$ bpftool -p version
{
"version": "5.9.0-rc1",
"features": {
"libbfd": true,
"skeletons": true
}
}
Some other parameters are optional at compilation
("DISASM_FOUR_ARGS_SIGNATURE", LIBCAP support) but they do not impact
significantly bpftool's behaviour from a user's point of view, so their
status is not reported.
Available commands and supported program types depend on the version
number, and are therefore not reported either. Note that they are
already available, albeit without JSON, via bpftool's help messages.
v3:
- Use a simple list instead of boolean values for plain output.
v2:
- Fix JSON (object instead or array for the features).
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200909162500.17010-2-quentin@isovalent.com
Diffstat (limited to 'tools/bpf/bpftool/Documentation/bpftool-iter.rst')
0 files changed, 0 insertions, 0 deletions