From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933112AbdDQInK (ORCPT ); Mon, 17 Apr 2017 04:43:10 -0400 Received: from terminus.zytor.com ([65.50.211.136]:42503 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932354AbdDQInG (ORCPT ); Mon, 17 Apr 2017 04:43:06 -0400 Date: Mon, 17 Apr 2017 01:36:27 -0700 From: tip-bot for David Carrillo-Cisneros Message-ID: Cc: mingo@kernel.org, acme@redhat.com, jolsa@kernel.org, eranian@google.com, hpa@zytor.com, tglx@linutronix.de, davidcc@google.com, pjt@google.com, peterz@infradead.org, linux-kernel@vger.kernel.org, sque@chromium.org, wangnan0@huawei.com, ak@linux.intel.com, mhiramat@kernel.org, alexander.shishkin@linux.intel.com, hekuang@huawei.com Reply-To: mingo@kernel.org, acme@redhat.com, jolsa@kernel.org, eranian@google.com, hpa@zytor.com, tglx@linutronix.de, davidcc@google.com, pjt@google.com, peterz@infradead.org, linux-kernel@vger.kernel.org, sque@chromium.org, wangnan0@huawei.com, ak@linux.intel.com, mhiramat@kernel.org, alexander.shishkin@linux.intel.com, hekuang@huawei.com In-Reply-To: <20170412064919.92449-5-davidcc@google.com> References: <20170412064919.92449-5-davidcc@google.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf util: Hint missing file when tool tips fail to load Git-Commit-ID: 570eda03213a216a88566c0da7bfe175832cfaa4 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: 570eda03213a216a88566c0da7bfe175832cfaa4 Gitweb: http://git.kernel.org/tip/570eda03213a216a88566c0da7bfe175832cfaa4 Author: David Carrillo-Cisneros AuthorDate: Tue, 11 Apr 2017 23:49:16 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 13 Apr 2017 11:52:51 -0300 perf util: Hint missing file when tool tips fail to load Besides memory allocation failure, tips.txt may fail to load because the file is not found (a more likely cause). Communicate that to the user in tips failure warning. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170412064919.92449-5-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index d8b45ce..6097d87 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -696,7 +696,8 @@ const char *perf_tip(const char *dirpath) tips = strlist__new("tips.txt", &conf); if (tips == NULL) - return errno == ENOENT ? NULL : "Tip: get more memory! ;-p"; + return errno == ENOENT ? NULL : + "Tip: check path of tips.txt or get more memory! ;-p"; if (strlist__nr_entries(tips) == 0) goto out;