summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/Documentation/bpftool-perf.rst
blob: bca5590a80d057dfb7b1c1c1b5d581536f88de27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
================
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
=======
	-h, --help
		  Print short generic help message (similar to **bpftool help**).

	-v, --version
		  Print version number (similar to **bpftool version**).

	-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**.

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}]


SEE ALSO
========
	**bpf**\ (2),
	**bpf-helpers**\ (7),
	**bpftool**\ (8),
	**bpftool-prog**\ (8),
	**bpftool-map**\ (8),
	**bpftool-cgroup**\ (8),
	**bpftool-feature**\ (8),
	**bpftool-net**\ (8)