aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation/perf-probe.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/Documentation/perf-probe.txt')
-rw-r--r--tools/perf/Documentation/perf-probe.txt21
1 files changed, 19 insertions, 2 deletions
diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt
index 34202b1be0bb..94a258c96a44 100644
--- a/tools/perf/Documentation/perf-probe.txt
+++ b/tools/perf/Documentation/perf-probe.txt
@@ -57,6 +57,14 @@ OPTIONS
57--force:: 57--force::
58 Forcibly add events with existing name. 58 Forcibly add events with existing name.
59 59
60-n::
61--dry-run::
62 Dry run. With this option, --add and --del doesn't execute actual
63 adding and removal operations.
64
65--max-probes::
66 Set the maximum number of probe points for an event. Default is 128.
67
60PROBE SYNTAX 68PROBE SYNTAX
61------------ 69------------
62Probe points are defined by following syntax. 70Probe points are defined by following syntax.
@@ -74,13 +82,22 @@ Probe points are defined by following syntax.
74'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'. 82'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'.
75'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. And ';PTN' means lazy matching pattern (see LAZY MATCHING). Note that ';PTN' must be the end of the probe point definition. In addition, '@SRC' specifies a source file which has that function. 83'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. And ';PTN' means lazy matching pattern (see LAZY MATCHING). Note that ';PTN' must be the end of the probe point definition. In addition, '@SRC' specifies a source file which has that function.
76It is also possible to specify a probe point by the source line number or lazy matching by using 'SRC:ALN' or 'SRC;PTN' syntax, where 'SRC' is the source file path, ':ALN' is the line number and ';PTN' is the lazy matching pattern. 84It is also possible to specify a probe point by the source line number or lazy matching by using 'SRC:ALN' or 'SRC;PTN' syntax, where 'SRC' is the source file path, ':ALN' is the line number and ';PTN' is the lazy matching pattern.
77'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). 85'ARG' specifies the arguments of this probe point, (see PROBE ARGUMENT).
86
87PROBE ARGUMENT
88--------------
89Each probe argument follows below syntax.
90
91 [NAME=]LOCALVAR|$retval|%REG|@SYMBOL[:TYPE]
92
93'NAME' specifies the name of this argument (optional). You can use the name of local variable, local data structure member (e.g. var->field, var.field2), or kprobe-tracer argument format (e.g. $retval, %ax, etc). Note that the name of this argument will be set as the last member name if you specify a local data structure member (e.g. field2 for 'var->field1.field2'.)
94'TYPE' casts the type of this argument (optional). If omitted, perf probe automatically set the type based on debuginfo.
78 95
79LINE SYNTAX 96LINE SYNTAX
80----------- 97-----------
81Line range is descripted by following syntax. 98Line range is descripted by following syntax.
82 99
83 "FUNC[:RLN[+NUM|:RLN2]]|SRC:ALN[+NUM|:ALN2]" 100 "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]"
84 101
85FUNC specifies the function name of showing lines. 'RLN' is the start line 102FUNC specifies the function name of showing lines. 'RLN' is the start line
86number from function entry line, and 'RLN2' is the end line number. As same as 103number from function entry line, and 'RLN2' is the end line number. As same as