perf probe: Handle gracefully some stupid and buggy line syntaxes
authorFranck Bui-Huu <fbuihuu@gmail.com>
Mon, 20 Dec 2010 14:18:05 +0000 (15:18 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 21 Dec 2010 19:20:13 +0000 (17:20 -0200)
commit21dd9ae5a4e9f717f3957ec934dd3158129436b8
tree817d9db270a3179f480eeac358d43c0c8655b361
parentfde52dbd7f71934aba4e150f3d1d51e826a08850
perf probe: Handle gracefully some stupid and buggy line syntaxes

Currently perf probe doesn't handle those incorrect syntaxes:

   $ perf probe -L sched.c:++13
   $ perf probe -L sched.c:-+13
   $ perf probe -L sched.c:10000000000000000000000000000+13

This patches rewrites parse_line_range_desc() to handle them.

As a bonus, it reports more useful error messages instead of: "Tailing
with invalid character...".

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
LKML-Reference: <1292854685-8230-7-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/util/probe-event.c