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 generic help message (similar to bpftool help).
39
40          -V, --version
41                 Print version number (similar to bpftool version).
42
43          -j, --json
44                 Generate JSON output. For commands that cannot produce  JSON,
45                 this option has no effect.
46
47          -p, --pretty
48                 Generate human-readable JSON output. Implies -j.
49
50          -d, --debug
51                 Print  all  logs available from libbpf, including debug-level
52                 information.
53

EXAMPLES

55       # bpftool perf
56
57
58          pid 21711  fd 5: prog_id 5  kprobe  func __x64_sys_write  offset 0
59          pid 21765  fd 5: prog_id 7  kretprobe  func __x64_sys_nanosleep  offset 0
60          pid 21767  fd 5: prog_id 8  tracepoint  sys_enter_nanosleep
61          pid 21800  fd 5: prog_id 9  uprobe  filename /home/yhs/a.out  offset 1159
62
63       # bpftool -j perf
64
65
66          [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
67           {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
68           {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
69           {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
70

SEE ALSO

72          bpf(2), bpf-helpers(7), bpftool(8), bpftool-prog(8), bpftool-map(8),
73          bpftool-cgroup(8),        bpftool-feature(8),        bpftool-net(8),
74          bpftool-btf(8)
75
76
77
78
79                                                               BPFTOOL-PERF(8)
Impressum