aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r--tools/perf/builtin-probe.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 92b4c491f23d..a99a366230ab 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -133,17 +133,16 @@ static void parse_probe_point(char *arg, struct probe_point *pp)
133 } 133 }
134 134
135 /* Exclusion check */ 135 /* Exclusion check */
136 if (pp->line && pp->function) 136 if (pp->line && pp->offset)
137 semantic_error("Function-relative line number is not" 137 semantic_error("Offset can't be used with line number.");
138 " supported yet.");
139 if (!pp->line && pp->file && !pp->function) 138 if (!pp->line && pp->file && !pp->function)
140 semantic_error("File always requires line number."); 139 semantic_error("File always requires line number.");
141 if (pp->offset && !pp->function) 140 if (pp->offset && !pp->function)
142 semantic_error("Offset requires an entry function."); 141 semantic_error("Offset requires an entry function.");
143 if (pp->retprobe && !pp->function) 142 if (pp->retprobe && !pp->function)
144 semantic_error("Return probe requires an entry function."); 143 semantic_error("Return probe requires an entry function.");
145 if (pp->offset && pp->retprobe) 144 if ((pp->offset || pp->line) && pp->retprobe)
146 semantic_error("Offset can't be used with return probe."); 145 semantic_error("Offset/Line can't be used with return probe.");
147 146
148 pr_debug("symbol:%s file:%s line:%d offset:%d, return:%d\n", 147 pr_debug("symbol:%s file:%s line:%d offset:%d, return:%d\n",
149 pp->function, pp->file, pp->line, pp->offset, pp->retprobe); 148 pp->function, pp->file, pp->line, pp->offset, pp->retprobe);
@@ -270,7 +269,7 @@ static const struct option options[] = {
270#ifdef NO_LIBDWARF 269#ifdef NO_LIBDWARF
271 "FUNC[+OFFS|%return] [ARG ...]", 270 "FUNC[+OFFS|%return] [ARG ...]",
272#else 271#else
273 "FUNC[+OFFS|%return][@SRC]|SRC:LINE [ARG ...]", 272 "FUNC[+OFFS|%return|:RLN][@SRC]|SRC:ALN [ARG ...]",
274#endif 273#endif
275 "probe point definition, where\n" 274 "probe point definition, where\n"
276 "\t\tGRP:\tGroup name (optional)\n" 275 "\t\tGRP:\tGroup name (optional)\n"
@@ -282,7 +281,8 @@ static const struct option options[] = {
282 "\t\tARG:\tProbe argument (only \n" 281 "\t\tARG:\tProbe argument (only \n"
283#else 282#else
284 "\t\tSRC:\tSource code path\n" 283 "\t\tSRC:\tSource code path\n"
285 "\t\tLINE:\tLine number\n" 284 "\t\tRLN:\tRelative line number from function entry.\n"
285 "\t\tALN:\tAbsolute line number in file.\n"
286 "\t\tARG:\tProbe argument (local variable name or\n" 286 "\t\tARG:\tProbe argument (local variable name or\n"
287#endif 287#endif
288 "\t\t\tkprobe-tracer argument format is supported.)\n", 288 "\t\t\tkprobe-tracer argument format is supported.)\n",