Re: [PATCH v2 bpf-next 8/9] bpftool: update doc to describe bpftool btf dump .. format meta

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2023-06-16 18:17 UTC+0100 ~ Alan Maguire <alan.maguire@xxxxxxxxxx>
> ...and provide an example of output.
> 
> Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
> ---
>  tools/bpf/bpftool/Documentation/bpftool-btf.rst | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/bpf/bpftool/Documentation/bpftool-btf.rst b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> index 342716f74ec4..6dd779dddbde 100644
> --- a/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> +++ b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> @@ -28,7 +28,7 @@ BTF COMMANDS
>  |	**bpftool** **btf help**
>  |
>  |	*BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* }
> -|	*FORMAT* := { **raw** | **c** }
> +|	*FORMAT* := { **raw** | **c** | **meta** }
>  |	*MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
>  |	*PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
>  
> @@ -67,8 +67,8 @@ DESCRIPTION
>  		  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.
> +		  output format. Raw (**raw**), C-syntax (**c**) and
> +                  BTF metadata (**meta**) formats are supported.

Please fix the indent, we're using a mix of tabs then spaces here (I
should try to fix that one day).

Any chance we get a one-sentence description of the metadata format,
please? :)

>  
>  	**bpftool btf help**
>  		  Print short help message.
> @@ -266,3 +266,13 @@ All the standard ways to specify map or program are supported:
>    [104859] FUNC 'smbalert_work' type_id=9695 linkage=static
>    [104860] FUNC 'smbus_alert' type_id=71367 linkage=static
>    [104861] FUNC 'smbus_do_alert' type_id=84827 linkage=static
> +
> +
> + **# bpftool btf dump file vmlinux format meta**
> +
> + ::

Missing blank line here

> + size 4904369
> + magic 0xeb9f       version 1          flags 0x0          hdr_len 24
> + type      len 2893508    off 0
> + str       len 2010837    off 2893508
> +

And please fix the indent here as well, the double-column should have no
indent but the example itself should have some (other examples on the
page use two spaces here).

Thanks a lot for the doc, and adding the example!

Quentin




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux