perf tools: Notify user when unrecognized event is specified

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>
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index b097570..e9e6d5c 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -678,6 +678,8 @@
 	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: