bpftool-perf.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ================
  2. bpftool-perf
  3. ================
  4. -------------------------------------------------------------------------------
  5. tool for inspection of perf related bpf prog attachments
  6. -------------------------------------------------------------------------------
  7. :Manual section: 8
  8. SYNOPSIS
  9. ========
  10. **bpftool** [*OPTIONS*] **perf** *COMMAND*
  11. *OPTIONS* := { [{ **-j** | **--json** }] [{ **-p** | **--pretty** }] }
  12. *COMMANDS* :=
  13. { **show** | **list** | **help** }
  14. PERF COMMANDS
  15. =============
  16. | **bpftool** **perf { show | list }**
  17. | **bpftool** **perf help**
  18. DESCRIPTION
  19. ===========
  20. **bpftool perf { show | list }**
  21. List all raw_tracepoint, tracepoint, kprobe attachment in the system.
  22. Output will start with process id and file descriptor in that process,
  23. followed by bpf program id, attachment information, and attachment point.
  24. The attachment point for raw_tracepoint/tracepoint is the trace probe name.
  25. The attachment point for k[ret]probe is either symbol name and offset,
  26. or a kernel virtual address.
  27. The attachment point for u[ret]probe is the file name and the file offset.
  28. **bpftool perf help**
  29. Print short help message.
  30. OPTIONS
  31. =======
  32. -h, --help
  33. Print short generic help message (similar to **bpftool help**).
  34. -v, --version
  35. Print version number (similar to **bpftool version**).
  36. -j, --json
  37. Generate JSON output. For commands that cannot produce JSON, this
  38. option has no effect.
  39. -p, --pretty
  40. Generate human-readable JSON output. Implies **-j**.
  41. EXAMPLES
  42. ========
  43. | **# bpftool perf**
  44. ::
  45. pid 21711 fd 5: prog_id 5 kprobe func __x64_sys_write offset 0
  46. pid 21765 fd 5: prog_id 7 kretprobe func __x64_sys_nanosleep offset 0
  47. pid 21767 fd 5: prog_id 8 tracepoint sys_enter_nanosleep
  48. pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
  49. |
  50. | **# bpftool -j perf**
  51. ::
  52. [{"pid":21711,"fd":5,"prog_id":5,"fd_type":"kprobe","func":"__x64_sys_write","offset":0}, \
  53. {"pid":21765,"fd":5,"prog_id":7,"fd_type":"kretprobe","func":"__x64_sys_nanosleep","offset":0}, \
  54. {"pid":21767,"fd":5,"prog_id":8,"fd_type":"tracepoint","tracepoint":"sys_enter_nanosleep"}, \
  55. {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
  56. SEE ALSO
  57. ========
  58. **bpftool**\ (8), **bpftool-prog**\ (8), **bpftool-map**\ (8)