perf probe: Fix line range description since a single file is allowed
authorFranck Bui-Huu <fbuihuu@gmail.com>
Mon, 20 Dec 2010 14:18:03 +0000 (15:18 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 21 Dec 2010 18:20:12 +0000 (16:20 -0200)
$ perf-probe -L sched.c

is currently allowed but not documented.

Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
LKML-Reference: <1292854685-8230-5-git-send-email-fbuihuu@gmail.com>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-probe.txt
tools/perf/util/probe-event.c

index 4e2323276984ca6f526e276af171d1c5afa00296..86b797a35aa6acae540b652345937991257daa4d 100644 (file)
@@ -117,7 +117,7 @@ LINE SYNTAX
 -----------
 Line range is described by following syntax.
 
- "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]"
+ "FUNC[:RLN[+NUM|-RLN2]]|SRC[:ALN[+NUM|-ALN2]]"
 
 FUNC specifies the function name of showing lines. 'RLN' is the start line
 number from function entry line, and 'RLN2' is the end line number. As same as
index b812f1412c3ad8101cb417a9aef2b576b6302457..3ba9c5393775a5755bd433344419404a5aee376e 100644 (file)
@@ -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;
-       /*
-        * <Syntax>
-        * SRC:SLN[+NUM|-ELN]
-        * FUNC[:SLN[+NUM|-ELN]]
-        */
+
        ptr = strchr(arg, ':');
        if (ptr) {
                lr->start = (int)strtoul(ptr + 1, &tmp, 0);