From: Andrii Nakryiko <andriin@fb.com>
To: <andrii.nakryiko@gmail.com>, <ast@fb.com>, <daniel@iogearbox.net>,
<netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
<kernel-team@fb.com>
Cc: Andrii Nakryiko <andriin@fb.com>,
Quentin Monnet <quentin.monnet@netronome.com>
Subject: [PATCH v3 bpf-next 11/12] bpftool/docs: add description of btf dump C option
Date: Fri, 24 May 2019 11:59:06 -0700 [thread overview]
Message-ID: <20190524185908.3562231-12-andriin@fb.com> (raw)
In-Reply-To: <20190524185908.3562231-1-andriin@fb.com>
Document optional **c** option for btf dump subcommand.
Cc: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
.../bpf/bpftool/Documentation/bpftool-btf.rst | 35 +++++++++++--------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/tools/bpf/bpftool/Documentation/bpftool-btf.rst b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
index 2dbc1413fabd..3daed9eba766 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-btf.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
@@ -19,10 +19,11 @@ SYNOPSIS
BTF COMMANDS
=============
-| **bpftool** **btf dump** *BTF_SRC*
+| **bpftool** **btf dump** *BTF_SRC* [**format** *FORMAT*]
| **bpftool** **btf help**
|
| *BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* }
+| *FORMAT* := { **raw** | **c** }
| *MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
@@ -31,23 +32,27 @@ DESCRIPTION
**bpftool btf dump** *BTF_SRC*
Dump BTF entries from a given *BTF_SRC*.
- When **id** is specified, BTF object with that ID will be
- loaded and all its BTF types emitted.
+ When **id** is specified, BTF object with that ID will be
+ loaded and all its BTF types emitted.
- When **map** is provided, it's expected that map has
- associated BTF object with BTF types describing key and
- value. It's possible to select whether to dump only BTF
- type(s) associated with key (**key**), value (**value**),
- both key and value (**kv**), or all BTF types present in
- associated BTF object (**all**). If not specified, **kv**
- is assumed.
+ When **map** is provided, it's expected that map has
+ associated BTF object with BTF types describing key and
+ value. It's possible to select whether to dump only BTF
+ type(s) associated with key (**key**), value (**value**),
+ both key and value (**kv**), or all BTF types present in
+ associated BTF object (**all**). If not specified, **kv**
+ is assumed.
- When **prog** is provided, it's expected that program has
- associated BTF object with BTF types.
+ When **prog** is provided, it's expected that program has
+ associated BTF object with BTF types.
- When specifying *FILE*, an ELF file is expected, containing
- .BTF section with well-defined BTF binary format data,
- typically produced by clang or pahole.
+ When specifying *FILE*, an ELF file is expected, containing
+ .BTF section with well-defined BTF binary format data,
+ 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**
Print short help message.
--
2.17.1
next prev parent reply other threads:[~2019-05-24 18:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 18:58 [PATCH v3 bpf-next 00/12] BTF-to-C converter Andrii Nakryiko
2019-05-24 18:58 ` [PATCH v3 bpf-next 01/12] libbpf: ensure libbpf.h is included along libbpf_internal.h Andrii Nakryiko
2019-05-24 18:58 ` [PATCH v3 bpf-next 02/12] libbpf: add btf__parse_elf API to load .BTF and .BTF.ext Andrii Nakryiko
2019-05-24 18:58 ` [PATCH v3 bpf-next 03/12] bpftool: use libbpf's btf__parse_elf API Andrii Nakryiko
2019-05-24 18:58 ` [PATCH v3 bpf-next 04/12] selftests/bpf: use btf__parse_elf to check presence of BTF/BTF.ext Andrii Nakryiko
2019-05-24 18:59 ` [PATCH v3 bpf-next 05/12] libbpf: add resizable non-thread safe internal hashmap Andrii Nakryiko
2019-07-18 0:24 ` Arnaldo Carvalho de Melo
2019-07-18 3:35 ` Andrii Nakryiko
2019-05-24 18:59 ` [PATCH v3 bpf-next 06/12] selftests/bpf: add tests for libbpf's hashmap Andrii Nakryiko
2019-05-24 18:59 ` [PATCH v3 bpf-next 07/12] libbpf: switch btf_dedup() to hashmap for dedup table Andrii Nakryiko
2019-05-24 18:59 ` [PATCH v3 bpf-next 08/12] libbpf: add btf_dump API for BTF-to-C conversion Andrii Nakryiko
2019-05-24 18:59 ` [PATCH v3 bpf-next 09/12] selftests/bpf: add btf_dump BTF-to-C conversion tests Andrii Nakryiko
2019-05-24 18:59 ` [PATCH v3 bpf-next 10/12] bpftool: add C output format option to btf dump subcommand Andrii Nakryiko
2019-05-24 19:49 ` Quentin Monnet
2019-05-24 18:59 ` Andrii Nakryiko [this message]
2019-05-24 19:49 ` [PATCH v3 bpf-next 11/12] bpftool/docs: add description of btf dump C option Quentin Monnet
2019-05-24 18:59 ` [PATCH v3 bpf-next 12/12] bpftool: update bash-completion w/ new c option for btf dump Andrii Nakryiko
2019-05-24 19:49 ` Quentin Monnet
2019-05-24 21:12 ` [PATCH v3 bpf-next 00/12] BTF-to-C converter Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190524185908.3562231-12-andriin@fb.com \
--to=andriin@fb.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).