18841da981
The "SEE ALSO" sections of bpftool's manual pages refer to bpf(2), bpf-helpers(7), then all existing bpftool man pages (save the current one). This leads to nearly-identical lists being duplicated in all manual pages. Ideally, when a new page is created, all lists should be updated accordingly, but this has led to omissions and inconsistencies multiple times in the past. Let's take it out of the RST files and generate the "SEE ALSO" sections automatically in the Makefile when generating the man pages. The lists are not really useful in the RST anyway because all other pages are available in the same directory. v3: - Fix conflict with a previous patchset that introduced RST2MAN_OPTS variable passed to rst2man. v2: - Use "echo -n" instead of "printf" in Makefile, to avoid any risk of passing a format string directly to the command. Signed-off-by: Quentin Monnet <quentin@isovalent.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200910203935.25304-1-quentin@isovalent.com
66 lines
2.0 KiB
ReStructuredText
66 lines
2.0 KiB
ReStructuredText
================
|
|
bpftool-perf
|
|
================
|
|
-------------------------------------------------------------------------------
|
|
tool for inspection of perf related bpf prog attachments
|
|
-------------------------------------------------------------------------------
|
|
|
|
:Manual section: 8
|
|
|
|
SYNOPSIS
|
|
========
|
|
|
|
**bpftool** [*OPTIONS*] **perf** *COMMAND*
|
|
|
|
*OPTIONS* := { [{ **-j** | **--json** }] [{ **-p** | **--pretty** }] }
|
|
|
|
*COMMANDS* :=
|
|
{ **show** | **list** | **help** }
|
|
|
|
PERF COMMANDS
|
|
=============
|
|
|
|
| **bpftool** **perf** { **show** | **list** }
|
|
| **bpftool** **perf help**
|
|
|
|
DESCRIPTION
|
|
===========
|
|
**bpftool perf { 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.
|
|
|
|
**bpftool perf help**
|
|
Print short help message.
|
|
|
|
OPTIONS
|
|
=======
|
|
.. include:: common_options.rst
|
|
|
|
EXAMPLES
|
|
========
|
|
|
|
| **# bpftool perf**
|
|
|
|
::
|
|
|
|
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 -j perf**
|
|
|
|
::
|
|
|
|
[{"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}]
|