From: Marti Raudsepp Date: Tue, 27 Oct 2009 00:33:04 +0000 (+0000) Subject: perf tools: Notify user when unrecognized event is specified X-Git-Tag: v2.6.33-rc1~399^2~165^2~44 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=85df6f683efa457440eb922272fd5a71aa022ad4;p=~emulex%2Finfiniband.git perf tools: Notify user when unrecognized event is specified Previously no indication was given about what went wrong. Signed-off-by: Marti Raudsepp Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <03ec9ee96f17cef05424.1256603584@localhost> Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index b097570e962..e9e6d5c0ae4 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -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: