From: Song Liu <songliubraving@fb.com>
To: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>
Cc: <kernel-team@fb.com>, <ast@kernel.org>, <daniel@iogearbox.net>,
Song Liu <songliubraving@fb.com>
Subject: [RFC bpf-next 4/4] bpftool: Documentation for bpftool prog profile
Date: Thu, 13 Feb 2020 13:01:15 -0800 [thread overview]
Message-ID: <20200213210115.1455809-5-songliubraving@fb.com> (raw)
In-Reply-To: <20200213210115.1455809-1-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 64ddf8a4c518..22ff0df327a1 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* }
@@ -47,6 +48,9 @@ PROG COMMANDS
| *ATTACH_TYPE* := {
| **msg_verdict** | **stream_verdict** | **stream_parser** | **flow_dissector**
| }
+| *METRIC* := {
+| **cycles** | **instructions** | **l1d_loads** | **llc_misses**
+| }
DESCRIPTION
@@ -188,6 +192,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*
+ Profile *METRICs* for bpf program *PROG* for *DURATION*
+ seconds.
+
**bpftool prog help**
Print short help message.
@@ -310,6 +318,15 @@ EXAMPLES
**# rm /sys/fs/bpf/xdp1**
+|
+| **# bpftool prog profile 20 id 810 cycles instructions**
+
+::
+ cycles: duration 20 run_cnt 1368 miss_cnt 665
+ counter 503377 enabled 668202 running 351857
+ instructions: duration 20 run_cnt 1368 miss_cnt 707
+ counter 398625 enabled 502330 running 272014
+
SEE ALSO
========
**bpf**\ (2),
--
2.17.1
prev parent reply other threads:[~2020-02-13 21:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 21:01 [RFC bpf-next 0/4] bpftool: introduce prog profile Song Liu
2020-02-13 21:01 ` [RFC bpf-next 1/4] bpf: allow bpf_perf_event_read_value in all BPF programs Song Liu
2020-02-13 21:01 ` [RFC bpf-next 2/4] libbpf: introduce bpf_program__overwrite_section_name() Song Liu
2020-02-13 21:01 ` [RFC bpf-next 3/4] bpftool: introduce "prog profile" command Song Liu
2020-02-13 21:50 ` Toke Høiland-Jørgensen
2020-02-13 21:55 ` Song Liu
2020-02-13 22:06 ` Toke Høiland-Jørgensen
2020-02-15 0:45 ` Alexei Starovoitov
2020-02-17 2:51 ` Song Liu
2020-02-13 21:01 ` Song Liu [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=20200213210115.1455809-5-songliubraving@fb.com \
--to=songliubraving@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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).