From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932209AbbE1Jfz (ORCPT ); Thu, 28 May 2015 05:35:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:46804 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753862AbbE1JcN (ORCPT ); Thu, 28 May 2015 05:32:13 -0400 Date: Thu, 28 May 2015 02:31:55 -0700 From: tip-bot for Jiri Olsa Message-ID: Cc: mingo@kernel.org, hpa@zytor.com, namhyung@kernel.org, paulus@samba.org, jolsa@kernel.org, a.p.zijlstra@chello.nl, tglx@linutronix.de, mpetlan@redhat.com, acme@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com Reply-To: mpetlan@redhat.com, tglx@linutronix.de, acme@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, mingo@kernel.org, namhyung@kernel.org, hpa@zytor.com, paulus@samba.org, jolsa@kernel.org, a.p.zijlstra@chello.nl In-Reply-To: <1432587114-14924-1-git-send-email-jolsa@kernel.org> References: <1432587114-14924-1-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Add hint for ' Too many events are opened.' error message Git-Commit-ID: 18ffdfe8e98f861a39590ef2374ad51fc963567e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 18ffdfe8e98f861a39590ef2374ad51fc963567e Gitweb: http://git.kernel.org/tip/18ffdfe8e98f861a39590ef2374ad51fc963567e Author: Jiri Olsa AuthorDate: Mon, 25 May 2015 22:51:54 +0200 Committer: Arnaldo Carvalho de Melo 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 ' 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 ' Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1432587114-14924-1-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 c886b9f..a3e36fc 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 '"); case ENODEV: if (target->cpu_list) return scnprintf(msg, size, "%s",