xref: /linux/tools/perf/Documentation/perf-probe.txt (revision c43f9d1e61e265c6bfafdd65c7f07c8d71a7efc3)
1595c3649SMasami Hiramatsuperf-probe(1)
2595c3649SMasami Hiramatsu=============
3595c3649SMasami Hiramatsu
4595c3649SMasami HiramatsuNAME
5595c3649SMasami Hiramatsu----
6595c3649SMasami Hiramatsuperf-probe - Define new dynamic tracepoints
7595c3649SMasami Hiramatsu
8595c3649SMasami HiramatsuSYNOPSIS
9595c3649SMasami Hiramatsu--------
10595c3649SMasami Hiramatsu[verse]
11*c43f9d1eSMasami Hiramatsu'perf probe' [options] --add 'PROBE' [--add 'PROBE' ...]
12*c43f9d1eSMasami Hiramatsuor
13*c43f9d1eSMasami Hiramatsu'perf probe' [options] 'PROBE' ['PROBE' ...]
14595c3649SMasami Hiramatsu
15595c3649SMasami Hiramatsu
16595c3649SMasami HiramatsuDESCRIPTION
17595c3649SMasami Hiramatsu-----------
18595c3649SMasami HiramatsuThis command defines dynamic tracepoint events, by symbol and registers
19595c3649SMasami Hiramatsuwithout debuginfo, or by C expressions (C line numbers, C function names,
20595c3649SMasami Hiramatsuand C local variables) with debuginfo.
21595c3649SMasami Hiramatsu
22595c3649SMasami Hiramatsu
23595c3649SMasami HiramatsuOPTIONS
24595c3649SMasami Hiramatsu-------
25595c3649SMasami Hiramatsu-k::
26*c43f9d1eSMasami Hiramatsu--vmlinux=PATH::
27595c3649SMasami Hiramatsu	Specify vmlinux path which has debuginfo (Dwarf binary).
28595c3649SMasami Hiramatsu
29595c3649SMasami Hiramatsu-v::
30595c3649SMasami Hiramatsu--verbose::
31595c3649SMasami Hiramatsu        Be more verbose (show parsed arguments, etc).
32595c3649SMasami Hiramatsu
33*c43f9d1eSMasami Hiramatsu-a::
34*c43f9d1eSMasami Hiramatsu--add::
35595c3649SMasami Hiramatsu	Define a probe point (see PROBE SYNTAX for detail)
36595c3649SMasami Hiramatsu
37595c3649SMasami HiramatsuPROBE SYNTAX
38595c3649SMasami Hiramatsu------------
39595c3649SMasami HiramatsuProbe points are defined by following syntax.
40595c3649SMasami Hiramatsu
41*c43f9d1eSMasami Hiramatsu "FUNC[+OFFS|:RLN|%return][@SRC]|SRC:ALN [ARG ...]"
42595c3649SMasami Hiramatsu
43*c43f9d1eSMasami Hiramatsu'FUNC' specifies a probed function name, and it may have one of the following options; '+OFFS' is the offset from function entry address in bytes, 'RLN' is the relative-line number from function entry line, and '%return' means that it probes function return. In addition, 'SRC' specifies a source file which has that function.
44*c43f9d1eSMasami HiramatsuIt is also possible to specify a probe point by the source line number by using 'SRC:ALN' syntax, where 'SRC' is the source file path and 'ALN' is the line number.
45595c3649SMasami 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).
46595c3649SMasami Hiramatsu
47595c3649SMasami HiramatsuSEE ALSO
48595c3649SMasami Hiramatsu--------
49595c3649SMasami Hiramatsulinkperf:perf-trace[1], linkperf:perf-record[1]
50