perf tools: Add hint for 'Too many events are opened.' error message
Jiri Olsa
reviewerPATCH 1/1 perf tools: Add hint for 'Too many events are opened.' error message
Enhancing the 'Too many events are opened.' error message with hint to use use 'ulimit -n <limit>' command.
Before:
$ perf record -e 'sched:*,syscalls:*' ls Error: Too many events are opened. Try again after reducing the number of events.
Now:
$ perf record -e 'sched:*,syscalls:*' ls Error: Too many events are opened. Probably the maximum number of open file descriptors has been reached. Hint: Try again after reducing the number of events. Hint: Try increasing the limit with 'ulimit -n <limit>'
Cc Michael Petlan <[email protected]>
Signed-off-by Jiri Olsa <[email protected]>
--- tools/perf/util/evsel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/util/evsel.c +3 -1
@@ -2149,7 +2149,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,case EMFILE :return scnprintf (msg, size,"%s" ,"Too many events are opened.\n" -"Try again after reducing the number of events." ); +"Probably the maximum number of open file descriptors has been reached.\n" +"Hint: Try again after reducing the number of events.\n" +"Hint: Try increasing the limit with 'ulimit -n <limit>'" );case ENODEV :if (target->cpu_list) return scnprintf(msg, size, "%s",
Signature · 1 line
1.9.3
Em Mon, May 25, 2015 at 10:51:54PM +0200, Jiri Olsa escreveu:
Quoted 2 lines
Enhancing the 'Too many events are opened.' error message with hint to use use 'ulimit -n <limit>' command.
<SNIP>
Quoted 7 lines
Now:
$ perf record -e 'sched:*,syscalls:*' ls Error: Too many events are opened. Probably the maximum number of open file descriptors has been reached. Hint: Try again after reducing the number of events. Hint: Try increasing the limit with 'ulimit -n <limit>'
Thanks, applied.
- Arnaldo
tip-bot for Jiri Olsa
merge bot[tip:perf/core] perf tools: Add hint for ' Too many events are opened.' error message
In reply to Jiri Olsaperf tools: Add hint for 'Too many events are opened.' error message
Commit-ID: 18ffdfe8e98f861a39590ef2374ad51fc963567e Gitweb: http://git.kernel.org/tip/18ffdfe8e98f861a39590ef2374ad51fc963567e Author: Jiri Olsa <[email protected]> AuthorDate: Mon, 25 May 2015 22:51:54 +0200 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 27 May 2015 20:28:37 -0300
perf tools: Add hint for 'Too many events are opened.' error message
Enhancing the 'Too many events are opened.' error message with hint to use use 'ulimit -n <limit>' command.
Before:
$ perf record -e 'sched:*,syscalls:*' ls Error: Too many events are opened. Try again after reducing the number of events.
Now:
$ perf record -e 'sched:*,syscalls:*' ls Error: Too many events are opened. Probably the maximum number of open file descriptors has been reached. Hint: Try again after reducing the number of events. Hint: Try increasing the limit with 'ulimit -n <limit>'
Signed-off-by Jiri Olsa <[email protected]>
Cc David Ahern <[email protected]>
Cc Michael Petlan <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/evsel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/util/evsel.c +3 -1
@@ -2149,7 +2149,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,case EMFILE :return scnprintf (msg, size,"%s" ,"Too many events are opened.\n" -"Try again after reducing the number of events." ); +"Probably the maximum number of open file descriptors has been reached.\n" +"Hint: Try again after reducing the number of events.\n" +"Hint: Try increasing the limit with 'ulimit -n <limit>'" );case ENODEV :if (target->cpu_list) return scnprintf(msg, size, "%s",