^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) bpftool-perf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) -------------------------------------------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) tool for inspection of perf related bpf prog attachments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) -------------------------------------------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) :Manual section: 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) SYNOPSIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) **bpftool** [*OPTIONS*] **perf** *COMMAND*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) *OPTIONS* := { [{ **-j** | **--json** }] [{ **-p** | **--pretty** }] }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) *COMMANDS* :=
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) { **show** | **list** | **help** }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) PERF COMMANDS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) | **bpftool** **perf** { **show** | **list** }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) | **bpftool** **perf help**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) DESCRIPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) **bpftool perf { show | list }**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) List all raw_tracepoint, tracepoint, kprobe attachment in the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Output will start with process id and file descriptor in that process,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) followed by bpf program id, attachment information, and attachment point.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) The attachment point for raw_tracepoint/tracepoint is the trace probe name.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) The attachment point for k[ret]probe is either symbol name and offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) or a kernel virtual address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) The attachment point for u[ret]probe is the file name and the file offset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) **bpftool perf help**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) Print short help message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) OPTIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) =======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) .. include:: common_options.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) EXAMPLES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) | **# bpftool perf**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) pid 21767 fd 5: prog_id 8 tracepoint sys_enter_nanosleep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) | **# bpftool -j perf**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]