From: David Carrillo-Cisneros Date: Wed, 12 Apr 2017 06:49:16 +0000 (-0700) Subject: perf util: Hint missing file when tool tips fail to load X-Git-Tag: Ubuntu-5.10.0-12.13~10445^2~1^2~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=570eda03213a216a88566c0da7bfe175832cfaa4;p=mirror_ubuntu-hirsute-kernel.git 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 --- 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) 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;