Linux 5.1.15
[linux/fpc-iii.git] / tools / bpf / bpftool / Documentation / bpftool-perf.rst
blobbca5590a80d057dfb7b1c1c1b5d581536f88de27
1 ================
2 bpftool-perf
3 ================
4 -------------------------------------------------------------------------------
5 tool for inspection of perf related bpf prog attachments
6 -------------------------------------------------------------------------------
8 :Manual section: 8
10 SYNOPSIS
11 ========
13         **bpftool** [*OPTIONS*] **perf** *COMMAND*
15         *OPTIONS* := { [{ **-j** | **--json** }] [{ **-p** | **--pretty** }] }
17         *COMMANDS* :=
18         { **show** | **list** | **help** }
20 PERF COMMANDS
21 =============
23 |       **bpftool** **perf { show | list }**
24 |       **bpftool** **perf help**
26 DESCRIPTION
27 ===========
28         **bpftool perf { show | list }**
29                   List all raw_tracepoint, tracepoint, kprobe attachment in the system.
31                   Output will start with process id and file descriptor in that process,
32                   followed by bpf program id, attachment information, and attachment point.
33                   The attachment point for raw_tracepoint/tracepoint is the trace probe name.
34                   The attachment point for k[ret]probe is either symbol name and offset,
35                   or a kernel virtual address.
36                   The attachment point for u[ret]probe is the file name and the file offset.
38         **bpftool perf help**
39                   Print short help message.
41 OPTIONS
42 =======
43         -h, --help
44                   Print short generic help message (similar to **bpftool help**).
46         -v, --version
47                   Print version number (similar to **bpftool version**).
49         -j, --json
50                   Generate JSON output. For commands that cannot produce JSON, this
51                   option has no effect.
53         -p, --pretty
54                   Generate human-readable JSON output. Implies **-j**.
56 EXAMPLES
57 ========
59 | **# bpftool perf**
63       pid 21711  fd 5: prog_id 5  kprobe  func __x64_sys_write  offset 0
64       pid 21765  fd 5: prog_id 7  kretprobe  func __x64_sys_nanosleep  offset 0
65       pid 21767  fd 5: prog_id 8  tracepoint  sys_enter_nanosleep
66       pid 21800  fd 5: prog_id 9  uprobe  filename /home/yhs/a.out  offset 1159
69 | **# bpftool -j perf**
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}]
79 SEE ALSO
80 ========
81         **bpf**\ (2),
82         **bpf-helpers**\ (7),
83         **bpftool**\ (8),
84         **bpftool-prog**\ (8),
85         **bpftool-map**\ (8),
86         **bpftool-cgroup**\ (8),
87         **bpftool-feature**\ (8),
88         **bpftool-net**\ (8)