Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'origin/master' on author's fork with sample correction.
  • Loading branch information
rameezrehman408 committed Aug 4, 2023
2 parents 4407d3f + 6be83a5 commit bf370ef
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
59 changes: 59 additions & 0 deletions docs/bpftool-btf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ BTF COMMANDS
DESCRIPTION
===========
<<<<<<< HEAD
**bpftool btf { show | list }** [**id** *BTF_ID*]
Show information about loaded BTF objects. If a BTF ID is specified
show information only about given BTF object, otherwise list all BTF
Expand Down Expand Up @@ -84,6 +85,64 @@ OPTIONS
for the base object, and passing this option is optional. When the main
BTF object is passed through other handles, this option becomes
necessary.
=======
**bpftool btf { show | list }** [**id** *BTF_ID*]
Show information about loaded BTF objects. If a BTF ID is
specified, show information only about given BTF object,
otherwise list all BTF objects currently loaded on the
system.

Since Linux 5.8 bpftool is able to discover information about
processes that hold open file descriptors (FDs) against BTF
objects. On such kernels bpftool will automatically emit this
information as well.

**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 **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 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.

OPTIONS
=======
.. include:: common_options.rst

-B, --base-btf *FILE*
Pass a base BTF object. Base BTF objects are typically used
with BTF objects for kernel modules. To avoid duplicating
all kernel symbols required by modules, BTF objects for
modules are "split", they are built incrementally on top of
the kernel (vmlinux) BTF object. So the base BTF reference
should usually point to the kernel BTF.

When the main BTF object to process (for example, the
module BTF to dump) is passed as a *FILE*, bpftool attempts
to autodetect the path for the base object, and passing
this option is optional. When the main BTF object is passed
through other handles, this option becomes necessary.
>>>>>>> master

EXAMPLES
========
Expand Down
6 changes: 6 additions & 0 deletions docs/bpftool-prog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ DESCRIPTION


Note: *FILE* must be located in *bpffs* mount. It must not
<<<<<<< HEAD
contain a dot character ('.'), which is reserved for future
=======

contain a dot character ('.'), which is reserved for future

>>>>>>> master
extensions of *bpffs*.

**bpftool prog { load | loadall }** *OBJ* *PATH* [**type** *TYPE*] [**map** { **idx** *IDX* | **name** *NAME* } *MAP*] [{ **offload_dev** | **xdpmeta_dev** } *NAME*] [**pinmaps** *MAP_DIR*] [**autoattach**]
Expand Down

0 comments on commit bf370ef

Please sign in to comment.