Merge branch 'for-33' of git://repo.or.cz/linux-kbuild
[linux-2.6-block.git] / tools / perf / Documentation / perf-probe.txt
1 perf-probe(1)
2 =============
3
4 NAME
5 ----
6 perf-probe - Define new dynamic tracepoints
7
8 SYNOPSIS
9 --------
10 [verse]
11 'perf probe' [options] --add='PROBE' [...]
12 or
13 'perf probe' [options] PROBE
14 or
15 'perf probe' [options] --del='[GROUP:]EVENT' [...]
16 or
17 'perf probe' --list
18
19 DESCRIPTION
20 -----------
21 This command defines dynamic tracepoint events, by symbol and registers
22 without debuginfo, or by C expressions (C line numbers, C function names,
23 and C local variables) with debuginfo.
24
25
26 OPTIONS
27 -------
28 -k::
29 --vmlinux=PATH::
30         Specify vmlinux path which has debuginfo (Dwarf binary).
31
32 -v::
33 --verbose::
34         Be more verbose (show parsed arguments, etc).
35
36 -a::
37 --add=::
38         Define a probe event (see PROBE SYNTAX for detail).
39
40 -d::
41 --del=::
42         Delete a probe event.
43
44 -l::
45 --list::
46         List up current probe events.
47
48 PROBE SYNTAX
49 ------------
50 Probe points are defined by following syntax.
51
52  "[EVENT=]FUNC[+OFFS|:RLN|%return][@SRC]|SRC:ALN [ARG ...]"
53
54 'EVENT' specifies the name of new event, if omitted, it will be set the name of the probed function. Currently, event group name is set as 'probe'.
55 '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.
56 It 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.
57 '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).
58
59 SEE ALSO
60 --------
61 linkperf:perf-trace[1], linkperf:perf-record[1]