Masami Hiramatsu | 595c364 | 2009-10-16 20:08:27 -0400 | [diff] [blame] | 1 | perf-probe(1) |
| 2 | ============= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | perf-probe - Define new dynamic tracepoints |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
Masami Hiramatsu | c43f9d1 | 2009-11-03 19:12:13 -0500 | [diff] [blame^] | 11 | 'perf probe' [options] --add 'PROBE' [--add 'PROBE' ...] |
| 12 | or |
| 13 | 'perf probe' [options] 'PROBE' ['PROBE' ...] |
Masami Hiramatsu | 595c364 | 2009-10-16 20:08:27 -0400 | [diff] [blame] | 14 | |
| 15 | |
| 16 | DESCRIPTION |
| 17 | ----------- |
| 18 | This command defines dynamic tracepoint events, by symbol and registers |
| 19 | without debuginfo, or by C expressions (C line numbers, C function names, |
| 20 | and C local variables) with debuginfo. |
| 21 | |
| 22 | |
| 23 | OPTIONS |
| 24 | ------- |
| 25 | -k:: |
Masami Hiramatsu | c43f9d1 | 2009-11-03 19:12:13 -0500 | [diff] [blame^] | 26 | --vmlinux=PATH:: |
Masami Hiramatsu | 595c364 | 2009-10-16 20:08:27 -0400 | [diff] [blame] | 27 | Specify vmlinux path which has debuginfo (Dwarf binary). |
| 28 | |
| 29 | -v:: |
| 30 | --verbose:: |
| 31 | Be more verbose (show parsed arguments, etc). |
| 32 | |
Masami Hiramatsu | c43f9d1 | 2009-11-03 19:12:13 -0500 | [diff] [blame^] | 33 | -a:: |
| 34 | --add:: |
Masami Hiramatsu | 595c364 | 2009-10-16 20:08:27 -0400 | [diff] [blame] | 35 | Define a probe point (see PROBE SYNTAX for detail) |
| 36 | |
| 37 | PROBE SYNTAX |
| 38 | ------------ |
| 39 | Probe points are defined by following syntax. |
| 40 | |
Masami Hiramatsu | c43f9d1 | 2009-11-03 19:12:13 -0500 | [diff] [blame^] | 41 | "FUNC[+OFFS|:RLN|%return][@SRC]|SRC:ALN [ARG ...]" |
Masami Hiramatsu | 595c364 | 2009-10-16 20:08:27 -0400 | [diff] [blame] | 42 | |
Masami Hiramatsu | c43f9d1 | 2009-11-03 19:12:13 -0500 | [diff] [blame^] | 43 | '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 | 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. |
Masami Hiramatsu | 595c364 | 2009-10-16 20:08:27 -0400 | [diff] [blame] | 45 | '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). |
| 46 | |
| 47 | SEE ALSO |
| 48 | -------- |
| 49 | linkperf:perf-trace[1], linkperf:perf-record[1] |