perf tools: Notify user when unrecognized event is specified
authorMarti Raudsepp <marti@juffo.org>
Tue, 27 Oct 2009 00:33:04 +0000 (00:33 +0000)
committerIngo Molnar <mingo@elte.hu>
Tue, 27 Oct 2009 13:52:31 +0000 (14:52 +0100)
Previously no indication was given about what went wrong.

Signed-off-by: Marti Raudsepp <marti@juffo.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <03ec9ee96f17cef05424.1256603584@localhost>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/parse-events.c

index b097570e962331b410f654c0c2b827e862a51531..e9e6d5c0ae4a8c6857475076d876f434d59276f0 100644 (file)
@@ -678,6 +678,8 @@ parse_event_symbols(const char **str, struct perf_event_attr *attr)
        if (ret != EVT_FAILED)
                goto modifier;
 
+       fprintf(stderr, "invalid or unsupported event: '%s'\n", *str);
+       fprintf(stderr, "Run 'perf list' for a list of valid events\n");
        return EVT_FAILED;
 
 modifier:
This page took 0.028216 seconds and 5 git commands to generate.