Commit 220ba451 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

bpftool/docs: add description of btf dump C option

Document optional **c** option for btf dump subcommand.

Cc: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 2119f218
...@@ -19,10 +19,11 @@ SYNOPSIS ...@@ -19,10 +19,11 @@ SYNOPSIS
BTF COMMANDS BTF COMMANDS
============= =============
| **bpftool** **btf dump** *BTF_SRC* | **bpftool** **btf dump** *BTF_SRC* [**format** *FORMAT*]
| **bpftool** **btf help** | **bpftool** **btf help**
| |
| *BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* } | *BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* }
| *FORMAT* := { **raw** | **c** }
| *MAP* := { **id** *MAP_ID* | **pinned** *FILE* } | *MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* } | *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
...@@ -31,23 +32,27 @@ DESCRIPTION ...@@ -31,23 +32,27 @@ DESCRIPTION
**bpftool btf dump** *BTF_SRC* **bpftool btf dump** *BTF_SRC*
Dump BTF entries from a given *BTF_SRC*. Dump BTF entries from a given *BTF_SRC*.
When **id** is specified, BTF object with that ID will be When **id** is specified, BTF object with that ID will be
loaded and all its BTF types emitted. loaded and all its BTF types emitted.
When **map** is provided, it's expected that map has When **map** is provided, it's expected that map has
associated BTF object with BTF types describing key and associated BTF object with BTF types describing key and
value. It's possible to select whether to dump only BTF value. It's possible to select whether to dump only BTF
type(s) associated with key (**key**), value (**value**), type(s) associated with key (**key**), value (**value**),
both key and value (**kv**), or all BTF types present in both key and value (**kv**), or all BTF types present in
associated BTF object (**all**). If not specified, **kv** associated BTF object (**all**). If not specified, **kv**
is assumed. is assumed.
When **prog** is provided, it's expected that program has When **prog** is provided, it's expected that program has
associated BTF object with BTF types. associated BTF object with BTF types.
When specifying *FILE*, an ELF file is expected, containing When specifying *FILE*, an ELF file is expected, containing
.BTF section with well-defined BTF binary format data, .BTF section with well-defined BTF binary format data,
typically produced by clang or pahole. typically produced by clang or pahole.
**format** option can be used to override default (raw)
output format. Raw (**raw**) or C-syntax (**c**) output
formats are supported.
**bpftool btf help** **bpftool btf help**
Print short help message. Print short help message.
......
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