18c2ecf20Sopenharmony_ci================ 28c2ecf20Sopenharmony_cibpftool-perf 38c2ecf20Sopenharmony_ci================ 48c2ecf20Sopenharmony_ci------------------------------------------------------------------------------- 58c2ecf20Sopenharmony_citool for inspection of perf related bpf prog attachments 68c2ecf20Sopenharmony_ci------------------------------------------------------------------------------- 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci:Manual section: 8 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciSYNOPSIS 118c2ecf20Sopenharmony_ci======== 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci **bpftool** [*OPTIONS*] **perf** *COMMAND* 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci *OPTIONS* := { [{ **-j** | **--json** }] [{ **-p** | **--pretty** }] } 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci *COMMANDS* := 188c2ecf20Sopenharmony_ci { **show** | **list** | **help** } 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciPERF COMMANDS 218c2ecf20Sopenharmony_ci============= 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci| **bpftool** **perf** { **show** | **list** } 248c2ecf20Sopenharmony_ci| **bpftool** **perf help** 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciDESCRIPTION 278c2ecf20Sopenharmony_ci=========== 288c2ecf20Sopenharmony_ci **bpftool perf { show | list }** 298c2ecf20Sopenharmony_ci List all raw_tracepoint, tracepoint, kprobe attachment in the system. 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci Output will start with process id and file descriptor in that process, 328c2ecf20Sopenharmony_ci followed by bpf program id, attachment information, and attachment point. 338c2ecf20Sopenharmony_ci The attachment point for raw_tracepoint/tracepoint is the trace probe name. 348c2ecf20Sopenharmony_ci The attachment point for k[ret]probe is either symbol name and offset, 358c2ecf20Sopenharmony_ci or a kernel virtual address. 368c2ecf20Sopenharmony_ci The attachment point for u[ret]probe is the file name and the file offset. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci **bpftool perf help** 398c2ecf20Sopenharmony_ci Print short help message. 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ciOPTIONS 428c2ecf20Sopenharmony_ci======= 438c2ecf20Sopenharmony_ci .. include:: common_options.rst 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciEXAMPLES 468c2ecf20Sopenharmony_ci======== 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci| **# bpftool perf** 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci:: 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0 538c2ecf20Sopenharmony_ci pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0 548c2ecf20Sopenharmony_ci pid 21767 fd 5: prog_id 8 tracepoint sys_enter_nanosleep 558c2ecf20Sopenharmony_ci pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci| 588c2ecf20Sopenharmony_ci| **# bpftool -j perf** 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci:: 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \ 638c2ecf20Sopenharmony_ci {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \ 648c2ecf20Sopenharmony_ci {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \ 658c2ecf20Sopenharmony_ci {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}] 66