From 9d95b580a8d64ef4d1660a21a9de0658fe29f041 Mon Sep 17 00:00:00 2001 From: Franck Bui-Huu Date: Mon, 20 Dec 2010 15:18:03 +0100 Subject: perf probe: Fix line range description since a single file is allowed $ perf-probe -L sched.c is currently allowed but not documented. Cc: Masami Hiramatsu LKML-Reference: <1292854685-8230-5-git-send-email-fbuihuu@gmail.com> Signed-off-by: Franck Bui-Huu Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/probe-event.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tools/perf/util/probe-event.c') diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index b812f14..3ba9c53 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -515,15 +515,18 @@ int show_available_vars(struct perf_probe_event *pevs __unused, } #endif +/* + * Stuff 'lr' according to the line range described by 'arg'. + * The line range syntax is described by: + * + * SRC[:SLN[+NUM|-ELN]] + * FNC[:SLN[+NUM|-ELN]] + */ int parse_line_range_desc(const char *arg, struct line_range *lr) { const char *ptr; char *tmp; - /* - * - * SRC:SLN[+NUM|-ELN] - * FUNC[:SLN[+NUM|-ELN]] - */ + ptr = strchr(arg, ':'); if (ptr) { lr->start = (int)strtoul(ptr + 1, &tmp, 0); -- cgit v1.1