Yonghong Song | b04df40 | 2018-05-24 11:21:58 -0700 | [diff] [blame] | 1 | ================ |
| 2 | bpftool-perf |
| 3 | ================ |
| 4 | ------------------------------------------------------------------------------- |
| 5 | tool for inspection of perf related bpf prog attachments |
| 6 | ------------------------------------------------------------------------------- |
| 7 | |
| 8 | :Manual section: 8 |
| 9 | |
| 10 | SYNOPSIS |
| 11 | ======== |
| 12 | |
| 13 | **bpftool** [*OPTIONS*] **perf** *COMMAND* |
| 14 | |
| 15 | *OPTIONS* := { [{ **-j** | **--json** }] [{ **-p** | **--pretty** }] } |
| 16 | |
| 17 | *COMMANDS* := |
| 18 | { **show** | **list** | **help** } |
| 19 | |
| 20 | PERF COMMANDS |
| 21 | ============= |
| 22 | |
| 23 | | **bpftool** **perf { show | list }** |
| 24 | | **bpftool** **perf help** |
| 25 | |
| 26 | DESCRIPTION |
| 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 | |
| 41 | OPTIONS |
| 42 | ======= |
| 43 | -h, --help |
| 44 | Print short generic help message (similar to **bpftool help**). |
| 45 | |
Quentin Monnet | 88b3eed8 | 2019-04-12 14:29:37 +0100 | [diff] [blame] | 46 | -V, --version |
Yonghong Song | b04df40 | 2018-05-24 11:21:58 -0700 | [diff] [blame] | 47 | Print version number (similar to **bpftool version**). |
| 48 | |
| 49 | -j, --json |
| 50 | Generate JSON output. For commands that cannot produce JSON, this |
| 51 | option has no effect. |
| 52 | |
| 53 | -p, --pretty |
| 54 | Generate human-readable JSON output. Implies **-j**. |
| 55 | |
Quentin Monnet | 775bc8a | 2019-05-24 11:36:46 +0100 | [diff] [blame] | 56 | -d, --debug |
| 57 | Print all logs available from libbpf, including debug-level |
| 58 | information. |
| 59 | |
Yonghong Song | b04df40 | 2018-05-24 11:21:58 -0700 | [diff] [blame] | 60 | EXAMPLES |
| 61 | ======== |
| 62 | |
| 63 | | **# bpftool perf** |
| 64 | |
| 65 | :: |
| 66 | |
| 67 | pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0 |
| 68 | pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0 |
| 69 | pid 21767 fd 5: prog_id 8 tracepoint sys_enter_nanosleep |
| 70 | pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159 |
| 71 | |
| 72 | | |
| 73 | | **# bpftool -j perf** |
| 74 | |
| 75 | :: |
| 76 | |
| 77 | [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \ |
| 78 | {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \ |
| 79 | {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \ |
| 80 | {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}] |
| 81 | |
| 82 | |
| 83 | SEE ALSO |
| 84 | ======== |
Quentin Monnet | f98e46a | 2018-11-08 11:52:28 +0000 | [diff] [blame] | 85 | **bpf**\ (2), |
| 86 | **bpf-helpers**\ (7), |
| 87 | **bpftool**\ (8), |
| 88 | **bpftool-prog**\ (8), |
| 89 | **bpftool-map**\ (8), |
| 90 | **bpftool-cgroup**\ (8), |
Quentin Monnet | 49eb7ab | 2019-01-17 15:27:50 +0000 | [diff] [blame] | 91 | **bpftool-feature**\ (8), |
Andrii Nakryiko | ca25333 | 2019-04-25 15:30:09 -0700 | [diff] [blame] | 92 | **bpftool-net**\ (8), |
| 93 | **bpftool-btf**\ (8) |