1================
2bpftool-perf
3================
4-------------------------------------------------------------------------------
5tool for inspection of perf related bpf prog attachments
6-------------------------------------------------------------------------------
7
8:Manual section: 8
9
10SYNOPSIS
11========
12
13	**bpftool** [*OPTIONS*] **perf** *COMMAND*
14
15	*OPTIONS* := { [{ **-j** | **--json** }] [{ **-p** | **--pretty** }] }
16
17	*COMMANDS* :=
18	{ **show** | **list** | **help** }
19
20PERF COMMANDS
21=============
22
23|	**bpftool** **perf** { **show** | **list** }
24|	**bpftool** **perf help**
25
26DESCRIPTION
27===========
28	**bpftool perf { show | list }**
29		  List all raw_tracepoint, tracepoint, kprobe attachment in the system.
30
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.
37
38	**bpftool perf help**
39		  Print short help message.
40
41OPTIONS
42=======
43	.. include:: common_options.rst
44
45EXAMPLES
46========
47
48| **# bpftool perf**
49
50::
51
52      pid 21711  fd 5: prog_id 5  kprobe  func __x64_sys_write  offset 0
53      pid 21765  fd 5: prog_id 7  kretprobe  func __x64_sys_nanosleep  offset 0
54      pid 21767  fd 5: prog_id 8  tracepoint  sys_enter_nanosleep
55      pid 21800  fd 5: prog_id 9  uprobe  filename /home/yhs/a.out  offset 1159
56
57|
58| **# bpftool -j perf**
59
60::
61
62    [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
63     {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
64     {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
65     {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
66