xref: /linux/tools/perf/Documentation/perf-probe.txt (revision 595c36490deb49381dc51231a3d5e6b66786ed27)
1*595c3649SMasami Hiramatsuperf-probe(1)
2*595c3649SMasami Hiramatsu=============
3*595c3649SMasami Hiramatsu
4*595c3649SMasami HiramatsuNAME
5*595c3649SMasami Hiramatsu----
6*595c3649SMasami Hiramatsuperf-probe - Define new dynamic tracepoints
7*595c3649SMasami Hiramatsu
8*595c3649SMasami HiramatsuSYNOPSIS
9*595c3649SMasami Hiramatsu--------
10*595c3649SMasami Hiramatsu[verse]
11*595c3649SMasami Hiramatsu'perf probe' [-k <file>] -P 'PROBE' [-P 'PROBE' ...]
12*595c3649SMasami Hiramatsu
13*595c3649SMasami Hiramatsu
14*595c3649SMasami HiramatsuDESCRIPTION
15*595c3649SMasami Hiramatsu-----------
16*595c3649SMasami HiramatsuThis command defines dynamic tracepoint events, by symbol and registers
17*595c3649SMasami Hiramatsuwithout debuginfo, or by C expressions (C line numbers, C function names,
18*595c3649SMasami Hiramatsuand C local variables) with debuginfo.
19*595c3649SMasami Hiramatsu
20*595c3649SMasami Hiramatsu
21*595c3649SMasami HiramatsuOPTIONS
22*595c3649SMasami Hiramatsu-------
23*595c3649SMasami Hiramatsu-k::
24*595c3649SMasami Hiramatsu--vmlinux::
25*595c3649SMasami Hiramatsu	Specify vmlinux path which has debuginfo (Dwarf binary).
26*595c3649SMasami Hiramatsu
27*595c3649SMasami Hiramatsu-v::
28*595c3649SMasami Hiramatsu--verbose::
29*595c3649SMasami Hiramatsu        Be more verbose (show parsed arguments, etc).
30*595c3649SMasami Hiramatsu
31*595c3649SMasami Hiramatsu-P::
32*595c3649SMasami Hiramatsu--probe::
33*595c3649SMasami Hiramatsu	Define a probe point (see PROBE SYNTAX for detail)
34*595c3649SMasami Hiramatsu
35*595c3649SMasami HiramatsuPROBE SYNTAX
36*595c3649SMasami Hiramatsu------------
37*595c3649SMasami HiramatsuProbe points are defined by following syntax.
38*595c3649SMasami Hiramatsu
39*595c3649SMasami Hiramatsu "TYPE:[GRP/]NAME FUNC[+OFFS][@SRC]|@SRC:LINE [ARG ...]"
40*595c3649SMasami Hiramatsu
41*595c3649SMasami Hiramatsu'TYPE' specifies the type of probe point, you can use either "p" (kprobe) or "r" (kretprobe) for 'TYPE'. 'GRP' specifies the group name of this probe, and 'NAME' specifies the event name. If 'GRP' is omitted, "kprobes" is used for its group name.
42*595c3649SMasami Hiramatsu'FUNC' and 'OFFS' specifies function and offset (in byte) where probe will be put. In addition, 'SRC' specifies a source file which has that function (this is mainly for inline functions).
43*595c3649SMasami HiramatsuYou can specify a probe point by the source line number by using '@SRC:LINE' syntax, where 'SRC' is the source file path and 'LINE' is the line number.
44*595c3649SMasami Hiramatsu'ARG' specifies the arguments of this probe point. You can use the name of local variable, or kprobe-tracer argument format (e.g. $retval, %ax, etc).
45*595c3649SMasami Hiramatsu
46*595c3649SMasami HiramatsuSEE ALSO
47*595c3649SMasami Hiramatsu--------
48*595c3649SMasami Hiramatsulinkperf:perf-trace[1], linkperf:perf-record[1]
49