bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Monnet <quentin@isovalent.com>
To: Song Liu <songliubraving@fb.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: kernel-team@fb.com, ast@kernel.org, daniel@iogearbox.net,
	arnaldo.melo@gmail.com, jolsa@kernel.org
Subject: Re: [PATCH v2 bpf-next 2/2] bpftool: Documentation for bpftool prog profile
Date: Mon, 2 Mar 2020 13:36:45 +0000	[thread overview]
Message-ID: <18194adf-2f74-6cf1-42c4-4645aec863ae@isovalent.com> (raw)
In-Reply-To: <20200228234058.634044-3-songliubraving@fb.com>

2020-02-28 15:40 UTC-0800 ~ Song Liu <songliubraving@fb.com>
> Add documentation for the new bpftool prog profile command.
> 
> Signed-off-by: Song Liu <songliubraving@fb.com>
> ---
>  .../bpf/bpftool/Documentation/bpftool-prog.rst  | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/tools/bpf/bpftool/Documentation/bpftool-prog.rst b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> index 46862e85fed2..1e2549dcd926 100644
> --- a/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> +++ b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> @@ -30,6 +30,7 @@ PROG COMMANDS
>  |	**bpftool** **prog detach** *PROG* *ATTACH_TYPE* [*MAP*]
>  |	**bpftool** **prog tracelog**
>  |	**bpftool** **prog run** *PROG* **data_in** *FILE* [**data_out** *FILE* [**data_size_out** *L*]] [**ctx_in** *FILE* [**ctx_out** *FILE* [**ctx_size_out** *M*]]] [**repeat** *N*]
> +|	**bpftool** **prog profile** [*DURATION*] *PROG* *METRICs*
>  |	**bpftool** **prog help**
>  |
>  |	*MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
> @@ -48,6 +49,9 @@ PROG COMMANDS
>  |       *ATTACH_TYPE* := {
>  |		**msg_verdict** | **stream_verdict** | **stream_parser** | **flow_dissector**
>  |	}
> +|	*METRIC* := {
> +|		**cycles** | **instructions** | **l1d_loads** | **llc_misses**
> +|	}
>  
>  
>  DESCRIPTION
> @@ -189,6 +193,10 @@ DESCRIPTION
>  		  not all of them can take the **ctx_in**/**ctx_out**
>  		  arguments. bpftool does not perform checks on program types.
>  
> +	**bpftool prog profile** *DURATION* *PROG* *METRICs*

If I understand correctly DURATION is optional. Could you please add
square brackets around it? Could you please also specify what it
defaults to if user does not pass the value?

> +		  Profile *METRICs* for bpf program *PROG* for *DURATION*
> +		  seconds.
> +
>  	**bpftool prog help**
>  		  Print short help message.
>  
> @@ -311,6 +319,15 @@ EXAMPLES
>  
>  **# rm /sys/fs/bpf/xdp1**
>  
> +|
> +| **# bpftool prog profile 10 id 337 cycles instructions llc_misses**
> +
> +::
> +         51397 run_cnt
> +      40176203 cycles                                                 (83.05%)
> +      42518139 instructions    #   1.06 insn per cycle                (83.39%)
> +           123 llc_misses      #   2.89 LLC misses per million isns   (83.15%)
> +
>  SEE ALSO
>  ========
>  	**bpf**\ (2),
> 

Could you please also add bash completion for the new subcommand?

Thanks,
Quentin

      reply	other threads:[~2020-03-02 13:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 23:40 [PATCH v2 bpf-next 0/2] bpftool: introduce prog profile Song Liu
2020-02-28 23:40 ` [PATCH v2 bpf-next 1/2] bpftool: introduce "prog profile" command Song Liu
2020-03-01  3:52   ` Yonghong Song
2020-03-01 22:37     ` Song Liu
2020-03-02  3:42       ` Yonghong Song
2020-03-02  4:26         ` Yonghong Song
2020-03-01  4:14   ` Yonghong Song
2020-03-01 22:37     ` Song Liu
2020-03-02  4:24   ` Yonghong Song
2020-03-03  0:10     ` Song Liu
2020-03-03 13:06       ` Arnaldo Carvalho de Melo
2020-03-02 13:36   ` Quentin Monnet
2020-03-02 16:52     ` Song Liu
2020-02-28 23:40 ` [PATCH v2 bpf-next 2/2] bpftool: Documentation for bpftool prog profile Song Liu
2020-03-02 13:36   ` Quentin Monnet [this message]

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=18194adf-2f74-6cf1-42c4-4645aec863ae@isovalent.com \
    --to=quentin@isovalent.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.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).