[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200213210115.1455809-5-songliubraving@fb.com>
Date: Thu, 13 Feb 2020 13:01:15 -0800
From: Song Liu <songliubraving@...com>
To: <netdev@...r.kernel.org>, <bpf@...r.kernel.org>
CC: <kernel-team@...com>, <ast@...nel.org>, <daniel@...earbox.net>,
Song Liu <songliubraving@...com>
Subject: [RFC bpf-next 4/4] bpftool: Documentation for bpftool prog profile
Add documentation for the new bpftool prog profile command.
Signed-off-by: Song Liu <songliubraving@...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
Powered by blists - more mailing lists