linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Michael Petlan <mpetlan@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 5/7] perf tools: Add hint for 'Too many events are opened.' error message
Date: Wed, 27 May 2015 21:05:32 -0300	[thread overview]
Message-ID: <1432771534-1312-6-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1432771534-1312-1-git-send-email-acme@kernel.org>

From: Jiri Olsa <jolsa@kernel.org>

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 <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432587114-14924-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index c886b9f7a48d..a3e36fc634dc 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -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",
-- 
2.1.0


  parent reply	other threads:[~2015-05-28  0:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  0:05 [GIT PULL 0/7] perf/core refactorings and improvements Arnaldo Carvalho de Melo
2015-05-28  0:05 ` [PATCH 1/7] perf tools: Introduce struct maps Arnaldo Carvalho de Melo
2015-05-28  0:05 ` [PATCH 2/7] perf tools: Protect accesses the map rbtrees with a rw lock Arnaldo Carvalho de Melo
2015-05-28  0:05 ` [PATCH 3/7] perf tools: Check if a map is still in use when deleting it Arnaldo Carvalho de Melo
2015-05-28  0:05 ` [PATCH 4/7] perf tools: Reference count struct map Arnaldo Carvalho de Melo
2015-05-28  0:05 ` Arnaldo Carvalho de Melo [this message]
2015-05-28  0:05 ` [PATCH 6/7] perf annotation: Add symbol__get_annotation Arnaldo Carvalho de Melo
2015-05-28  0:05 ` [PATCH 7/7] perf tools: Move branch option parsing to own file Arnaldo Carvalho de Melo
2015-05-28  0:27 ` [GIT PULL 0/7] perf/core refactorings and improvements Arnaldo Carvalho de Melo
2015-05-28  9:27   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432771534-1312-6-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).