0001 .. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002
0003 ================
0004 bpftool-perf
0005 ================
0006 -------------------------------------------------------------------------------
0007 tool for inspection of perf related bpf prog attachments
0008 -------------------------------------------------------------------------------
0009
0010 :Manual section: 8
0011
0012 .. include:: substitutions.rst
0013
0014 SYNOPSIS
0015 ========
0016
0017 **bpftool** [*OPTIONS*] **perf** *COMMAND*
0018
0019 *OPTIONS* := { |COMMON_OPTIONS| }
0020
0021 *COMMANDS* :=
0022 { **show** | **list** | **help** }
0023
0024 PERF COMMANDS
0025 =============
0026
0027 | **bpftool** **perf** { **show** | **list** }
0028 | **bpftool** **perf help**
0029
0030 DESCRIPTION
0031 ===========
0032 **bpftool perf { show | list }**
0033 List all raw_tracepoint, tracepoint, kprobe attachment in the system.
0034
0035 Output will start with process id and file descriptor in that process,
0036 followed by bpf program id, attachment information, and attachment point.
0037 The attachment point for raw_tracepoint/tracepoint is the trace probe name.
0038 The attachment point for k[ret]probe is either symbol name and offset,
0039 or a kernel virtual address.
0040 The attachment point for u[ret]probe is the file name and the file offset.
0041
0042 **bpftool perf help**
0043 Print short help message.
0044
0045 OPTIONS
0046 =======
0047 .. include:: common_options.rst
0048
0049 EXAMPLES
0050 ========
0051
0052 | **# bpftool perf**
0053
0054 ::
0055
0056 pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0
0057 pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0
0058 pid 21767 fd 5: prog_id 8 tracepoint sys_enter_nanosleep
0059 pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
0060
0061 |
0062 | **# bpftool -j perf**
0063
0064 ::
0065
0066 [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
0067 {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
0068 {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
0069 {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]