Lines Matching +full:bpftool +full:-
1 .. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 bpftool-prog
6 -------------------------------------------------------------------------------
8 -------------------------------------------------------------------------------
17 **bpftool** [*OPTIONS*] **prog** *COMMAND*
20 { **-f** | **--bpffs** } | { **-m** | **--mapcompat** } | { **-n** | **--nomount** } |
21 { **-L** | **--use-loader** } }
30 | **bpftool** **prog** { **show** | **list** } [*PROG*]
31 | **bpftool** **prog dump xlated** *PROG* [{ **file** *FILE* | [**opcodes**] [**linum**] [**visual*…
32 | **bpftool** **prog dump jited** *PROG* [{ **file** *FILE* | [**opcodes**] [**linum**] }]
33 | **bpftool** **prog pin** *PROG* *FILE*
34 | **bpftool** **prog** { **load** | **loadall** } *OBJ* *PATH* [**type** *TYPE*] [**map** { **idx**…
35 | **bpftool** **prog attach** *PROG* *ATTACH_TYPE* [*MAP*]
36 | **bpftool** **prog detach** *PROG* *ATTACH_TYPE* [*MAP*]
37 | **bpftool** **prog tracelog**
38 | **bpftool** **prog run** *PROG* **data_in** *FILE* [**data_out** *FILE* [**data_size_out** *L*]] …
39 | **bpftool** **prog profile** *PROG* [**duration** *DURATION*] *METRICs*
40 | **bpftool** **prog help**
68 **bpftool prog { show | list }** [*PROG*]
80 and the number of times it was run). If available, bpftool
86 Since Linux 5.8 bpftool is able to discover information about
88 programs. On such kernels bpftool will automatically emit this
91 **bpftool prog dump xlated** *PROG* [{ **file** *FILE* | [**opcodes**] [**linum**] [**visual**] }]
94 output in human-readable format. In this case, **opcodes**
112 **bpftool prog dump jited** *PROG* [{ **file** *FILE* | [**opcodes**] [**linum**] }]
125 **bpftool prog pin** *PROG* *FILE*
132 …**bpftool prog { load | loadall }** *OBJ* *PATH* [**type** *TYPE*] [**map** { **idx** *IDX* | **na…
134 **bpftool prog load** pins only the first program from the
135 *OBJ* as *PATH*. **bpftool prog loadall** pins all programs
139 By default bpftool will create new maps as declared in the ELF
149 device-bound without offloading, this facilitates access
157 such, so the path won't show in **bpftool prog show -f**,
158 only show in **bpftool link show -f**. Also, this only works
159 when bpftool (libbpf) is able to infer all necessary
162 support autoattach, bpftool falls back to regular pinning
169 **bpftool prog attach** *PROG* *ATTACH_TYPE* [*MAP*]
175 **bpftool prog detach** *PROG* *ATTACH_TYPE* [*MAP*]
181 **bpftool prog tracelog**
187 perf events (see also **bpftool-map**\ (8)).
189 …**bpftool prog run** *PROG* **data_in** *FILE* [**data_out** *FILE* [**data_size_out** *L*]] [**ct…
197 If this *FILE* is "**-**", input data is read from standard
199 **ctx_in**. Again, "**-**" can be used to read from standard
204 output flows, "**-**" can be used to print to the standard
220 arguments. bpftool does not perform checks on program types.
222 **bpftool prog profile** *PROG* [**duration** *DURATION*] *METRICs*
228 **bpftool prog help**
235 -f, --bpffs
239 -m, --mapcompat
242 -n, --nomount
246 -L, --use-loader
249 use, bpftool attempts to load the programs from the object
253 When combined with the **-d**\ \|\ **--debug** option,
257 and loading the programs (see **bpftool prog tracelog** as
262 **# bpftool prog show**
267 loaded_at 2017-09-29T20:11:00+0000 uid 0
271 **# bpftool --json --pretty prog show**
299 | **# bpftool prog dump xlated id 10 file /tmp/t**
300 | **$ ls -l /tmp/t**
304 -rw------- 1 root root 560 Jul 22 01:42 /tmp/t
306 **# bpftool prog dump jited tag 005a3d2123620c8b**
317 | **# mount -t bpf none /sys/fs/bpf/**
318 | **# bpftool prog pin id 10 /sys/fs/bpf/prog**
319 | **# bpftool prog load ./my_prog.o /sys/fs/bpf/prog2**
320 | **# ls -l /sys/fs/bpf/**
324 -rw------- 1 root root 0 Jul 22 01:43 prog
325 -rw------- 1 root root 0 Jul 22 01:44 prog2
327 **# bpftool prog dump jited pinned /sys/fs/bpf/prog opcodes**
343 | **# bpftool prog load xdp1_kern.o /sys/fs/bpf/xdp1 type xdp map name rxcnt id 7**
344 | **# bpftool prog show pinned /sys/fs/bpf/xdp1**
349 loaded_at 2018-06-25T16:17:31-0700 uid 0
355 | **# bpftool prog profile id 337 duration 10 cycles instructions llc_misses**
367 | **# bpftool prog tracelog**
368 | **# bpftool prog load -L -d file.o**
372 bpftool-620059 [004] d... 2634685.517903: bpf_trace_printk: btf_load size 665 r=5
373 …bpftool-620059 [004] d... 2634685.517912: bpf_trace_printk: map_create sample_map idx 0 type 2 va…
374 bpftool-620059 [004] d... 2634685.517997: bpf_trace_printk: prog_load sample insn_cnt 13 r=7
375 bpftool-620059 [004] d... 2634685.517999: bpf_trace_printk: close(5) = 0