@@ -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),
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(+)