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 }] | { -d | --debug }
12          }
13
14          COMMANDS := { show | list | help }
15

PERF COMMANDS

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

DESCRIPTION

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

OPTIONS

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

EXAMPLES

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

SEE ALSO

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