Skip to content

Commit

Permalink
perf tools: Notify user when unrecognized event is specified
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marti Raudsepp authored and Ingo Molnar committed Oct 27, 2009
1 parent 5b2bb75 commit 85df6f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 85df6f6

Please sign in to comment.