1BPFTOOL-PERF(8) BPFTOOL-PERF(8)
2
3
4
6 bpftool-perf - tool for inspection of perf related bpf prog attachments
7
9 bpftool [OPTIONS] perf COMMAND
10
11 OPTIONS := { { -j | --json } [{ -p | --pretty }] | { -d | --debug }
12 }
13
14 COMMANDS := { show | list | help }
15
17 bpftool perf { show | list }
18 bpftool perf help
19
20
22 bpftool perf { show | list }
23 List all raw_tracepoint, tracepoint, kprobe attachment in the
24 system.
25
26 Output will start with process id and file descriptor in that
27 process, followed by bpf program id, attachment information,
28 and attachment point. The attachment point for raw_trace‐
29 point/tracepoint is the trace probe name. The attachment
30 point for k[ret]probe is either symbol name and offset, or a
31 kernel virtual address. The attachment point for u[ret]probe
32 is the file name and the file offset.
33
34 bpftool perf help
35 Print short help message.
36
38 -h, --help
39 Print short help message (similar to bpftool help).
40
41 -V, --version
42 Print version number (similar to bpftool version), and op‐
43 tional features that were included when bpftool was compiled.
44 Optional features include linking against libbfd to provide
45 the disassembler for JIT-ted programs (bpftool prog dump
46 jited) and usage of BPF skeletons (some features like bpftool
47 prog profile or showing pids associated to BPF objects may
48 rely on it).
49
50 -j, --json
51 Generate JSON output. For commands that cannot produce JSON,
52 this option has no effect.
53
54 -p, --pretty
55 Generate human-readable JSON output. Implies -j.
56
57 -d, --debug
58 Print all logs available, even debug-level information. This
59 includes logs from libbpf as well as from the verifier, when
60 attempting to load programs.
61
63 # bpftool perf
64
65
66 pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0
67 pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0
68 pid 21767 fd 5: prog_id 8 tracepoint sys_enter_nanosleep
69 pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
70
71 # bpftool -j perf
72
73
74 [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
75 {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
76 {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
77 {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
78
80 bpf(2), bpf-helpers(7), bpftool(8), bpftool-btf(8),
81 bpftool-cgroup(8), bpftool-feature(8), bpftool-gen(8),
82 bpftool-iter(8), bpftool-link(8), bpftool-map(8), bpftool-net(8),
83 bpftool-prog(8), bpftool-struct_ops(8)
84
85
86
87
88 BPFTOOL-PERF(8)