1BPFTOOL-PERF(8)                                                BPFTOOL-PERF(8)
2
3
4

NAME

6       bpftool-perf - tool for inspection of perf related bpf prog attachments
7

SYNOPSIS

9          bpftool [OPTIONS] perf COMMAND
10
11          OPTIONS := { [{ -j | --json }] [{ -p | --pretty }] }
12
13          COMMANDS := { show | list | help }
14

PERF COMMANDS

16       bpftool perf { show | list }
17       bpftool perf help
18
19

DESCRIPTION

21          bpftool perf { show | list }
22                 List all raw_tracepoint, tracepoint, kprobe attachment in the
23                 system.
24
25                 Output will start with process id and file descriptor in that
26                 process,  followed by bpf program id, attachment information,
27                 and attachment point.  The attachment  point  for  raw_trace‐
28                 point/tracepoint  is  the  trace  probe name.  The attachment
29                 point for k[ret]probe is either symbol name and offset, or  a
30                 kernel virtual address.  The attachment point for u[ret]probe
31                 is the file name and the file offset.
32
33          bpftool perf help
34                 Print short help message.
35

OPTIONS

37          -h, --help
38                 Print short help message (similar to bpftool help).
39
40          -V, --version
41                 Print  version  number  (similar  to  bpftool  version),  and
42                 optional  features  that  were included when bpftool was com‐
43                 piled. Optional features include linking  against  libbfd  to
44                 provide  the  disassembler for JIT-ted programs (bpftool prog
45                 dump jited) and usage of BPF skeletons  (some  features  like
46                 bpftool  prog  profile  or  showing  pids  associated  to BPF
47                 objects may rely on it).
48
49          -j, --json
50                 Generate JSON output. For commands that cannot produce  JSON,
51                 this option has no effect.
52
53          -p, --pretty
54                 Generate human-readable JSON output. Implies -j.
55
56          -d, --debug
57                 Print  all logs available, even debug-level information. This
58                 includes logs from libbpf as well as from the verifier,  when
59                 attempting to load programs.
60

EXAMPLES

62       # bpftool perf
63
64
65          pid 21711  fd 5: prog_id 5  kprobe  func __x64_sys_write  offset 0
66          pid 21765  fd 5: prog_id 7  kretprobe  func __x64_sys_nanosleep  offset 0
67          pid 21767  fd 5: prog_id 8  tracepoint  sys_enter_nanosleep
68          pid 21800  fd 5: prog_id 9  uprobe  filename /home/yhs/a.out  offset 1159
69
70       # bpftool -j perf
71
72
73          [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
74           {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
75           {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
76           {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
77

SEE ALSO

79          bpf(2),       bpf-helpers(7),       bpftool(8),      bpftool-btf(8),
80          bpftool-cgroup(8),        bpftool-feature(8),        bpftool-gen(8),
81          bpftool-iter(8),  bpftool-link(8),  bpftool-map(8),  bpftool-net(8),
82          bpftool-prog(8), bpftool-struct_ops(8)
83
84
85
86
87                                                               BPFTOOL-PERF(8)
Impressum