aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorDavid Carrillo-Cisneros <davidcc@google.com>2017-04-12 02:49:16 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-04-13 10:52:51 -0400
commit570eda03213a216a88566c0da7bfe175832cfaa4 (patch)
treeff3ce5d375b0603f83c814c8fd9362385f2ad9fc /tools/perf
parent9961aa665b70e47d6c80141c4a2482266010f246 (diff)
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 <davidcc@google.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: He Kuang <hekuang@huawei.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Paul Turner <pjt@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Simon Que <sque@chromium.org> Cc: Stephane Eranian <eranian@google.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/20170412064919.92449-5-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index d8b45cea54d0..6097d87429e2 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -696,7 +696,8 @@ const char *perf_tip(const char *dirpath)
696 696
697 tips = strlist__new("tips.txt", &conf); 697 tips = strlist__new("tips.txt", &conf);
698 if (tips == NULL) 698 if (tips == NULL)
699 return errno == ENOENT ? NULL : "Tip: get more memory! ;-p"; 699 return errno == ENOENT ? NULL :
700 "Tip: check path of tips.txt or get more memory! ;-p";
700 701
701 if (strlist__nr_entries(tips) == 0) 702 if (strlist__nr_entries(tips) == 0)
702 goto out; 703 goto out;