Commit cdce4459 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf top: Add error message for EMFILE

When a user tries to open so many events, perf_event_open syscall may
fail with EMFILE. Provide advise for that case.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1325957132-10600-3-git-send-email-namhyung@gmail.comSigned-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c30ab8aa
...@@ -888,6 +888,10 @@ static void perf_top__start_counters(struct perf_top *top) ...@@ -888,6 +888,10 @@ static void perf_top__start_counters(struct perf_top *top)
ui__warning("The %s event is not supported.\n", ui__warning("The %s event is not supported.\n",
event_name(counter)); event_name(counter));
goto out_err; goto out_err;
} else if (err == EMFILE) {
ui__warning("Too many events are opened.\n"
"Try again after reducing the number of events\n");
goto out_err;
} }
ui__warning("The sys_perf_event_open() syscall " ui__warning("The sys_perf_event_open() syscall "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment