From: tip-bot for Namhyung Kim <namhyung@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
hpa@zytor.com, mingo@redhat.com, a.p.zijlstra@chello.nl,
namhyung@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf top: Add error message for EMFILE
Date: Sun, 8 Jan 2012 23:24:38 -0800 [thread overview]
Message-ID: <tip-cdce445906852d90efdc773ca7ba460e6e41664d@git.kernel.org> (raw)
In-Reply-To: <1325957132-10600-3-git-send-email-namhyung@gmail.com>
Commit-ID: cdce445906852d90efdc773ca7ba460e6e41664d
Gitweb: http://git.kernel.org/tip/cdce445906852d90efdc773ca7ba460e6e41664d
Author: Namhyung Kim <namhyung@gmail.com>
AuthorDate: Sun, 8 Jan 2012 02:25:27 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Sun, 8 Jan 2012 13:26:11 -0200
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.com
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-top.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index d89dec9..8f80df8 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -888,6 +888,10 @@ try_again:
ui__warning("The %s event is not supported.\n",
event_name(counter));
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 "
next prev parent reply other threads:[~2012-01-09 7:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-07 17:25 [PATCH 1/8] perf script: Add missing closedir() calls Namhyung Kim
2012-01-07 17:25 ` [PATCH 2/8] perf test: Change type of '-v' option to INCR Namhyung Kim
2012-01-09 7:23 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 3/8] perf top: Add error message for EMFILE Namhyung Kim
2012-01-09 7:24 ` tip-bot for Namhyung Kim [this message]
2012-01-07 17:25 ` [PATCH 4/8] perf kmem: Add missing closedir() calls Namhyung Kim
2012-01-09 7:25 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 5/8] perf kmem: Fix a memory leak Namhyung Kim
2012-01-09 7:26 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 6/8] perf annotate: Fix usage string Namhyung Kim
2012-01-09 7:26 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 7/8] perf annotate: Get rid of field_sep check Namhyung Kim
2012-01-09 7:27 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-07 17:25 ` [PATCH 8/8] perf report: Fix --stdio output alignment when --showcpuutilization used Namhyung Kim
2012-01-09 7:28 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-09 7:23 ` [tip:perf/core] perf script: Add missing closedir() calls tip-bot for Namhyung Kim
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=tip-cdce445906852d90efdc773ca7ba460e6e41664d@git.kernel.org \
--to=namhyung@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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).