summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event-parse.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-10-14 15:43:41 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-15 10:42:39 +0200
commit0d1da915c76838c9ee7af7cdefbcb2bae9424161 (patch)
tree5aac3e7f4c9c44814e6a1833e5d5f02b0b7ae9d7 /tools/perf/util/trace-event-parse.c
parentffa1895561645103d8f8059b35d9c06e6eeead2e (diff)
perf tools: Handle both versions of ftrace output
The ftrace output events can have either arguments or no arguments. The parser needs to be able to handle both. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <20091014194359.790221427@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/trace-event-parse.c')
-rw-r--r--tools/perf/util/trace-event-parse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 93a82fead95..c174765d405 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -1819,7 +1819,7 @@ static int event_read_print(struct event *event)
if (ret < 0)
return -1;
- return 0;
+ return ret;
fail:
free_token(token);
@@ -3088,6 +3088,9 @@ int parse_ftrace_file(char *buf, unsigned long size)
if (ret < 0)
die("failed to read ftrace event print fmt");
+ /* New ftrace handles args */
+ if (ret > 0)
+ return 0;
/*
* The arguments for ftrace files are parsed by the fields.
* Set up the fields as their arguments.