bpftool-perf - tool for inspection of perf related bpf prog attachments
Contents
Description
bpftoolperf{show|list}
List all raw_tracepoint, tracepoint, kprobe attachment in the system.
Output will start with process id and file descriptor in that process, followed by bpf program id,
attachment information, and attachment point. The attachment point for raw_tracepoint/tracepoint
is the trace probe name. The attachment point for k[ret]probe is either symbol name and offset,
or a kernel virtual address. The attachment point for u[ret]probe is the file name and the file
offset.
bpftoolperfhelp
Print short help message.
Examples
#bpftoolperf
pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0
pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0
pid 21767 fd 5: prog_id 8 tracepoint sys_enter_nanosleep
pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
#bpftool-jperf
[{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
{"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
{"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
{"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
Name
bpftool-perf - tool for inspection of perf related bpf prog attachments
Options
-h, --help
Print short help message (similar to bpftoolhelp).
-V, --version
Print bpftool's version number (similar to bpftoolversion), the number of the libbpf version in
use, and optional features that were included when bpftool was compiled. Optional features include
linking against LLVM or libbfd to provide the disassembler for JIT-ted programs (bpftoolprogdumpjited) and usage of BPF skeletons (some features like bpftoolprogprofile or showing pids
associated to BPF objects may rely on it).
-j, --json
Generate JSON output. For commands that cannot produce JSON, this option has no effect.
-p, --pretty
Generate human-readable JSON output. Implies -j.
-d, --debug
Print all logs available, even debug-level information. This includes logs from libbpf as well as
from the verifier, when attempting to load programs.
Perf Commands
bpftoolperf { show | list }
bpftoolperfhelpSee Also
bpf(2), bpf-helpers(7), bpftool(8), bpftool-btf(8), bpftool-cgroup(8), bpftool-feature(8), bpftool-gen(8), bpftool-iter(8), bpftool-link(8), bpftool-map(8), bpftool-net(8), bpftool-prog(8), bpftool-struct_ops(8) BPFTOOL-PERF(8)
Synopsis
bpftool [OPTIONS] perfCOMMANDOPTIONS := { { -j | --json } [{ -p | --pretty }] | { -d | --debug } }
COMMANDS := { show | list | help }
