summaryrefslogtreecommitdiff
path: root/tools/perf/ui/tui/setup.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-01-20 15:40:50 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-01-22 17:05:10 -0300
commit4397bd2f90459d550deca7f6ba32c12e382d8b57 (patch)
tree0fd3b8a6157994aa5e396f65db55a42b3e36a217 /tools/perf/ui/tui/setup.c
parent605a3069161dd966d6cea795133c673fb6706e52 (diff)
perf ui/tui: Show fatal error message only if exists
When perf exits with some error it shows the error message with ui__error() or ui__warning() and then calls ui__exit() during exit_browser(). On TUI, it then shows a window titled "Fatal Error" to inform user a last message which might be related with this condition. However it sometimes contains no message and just annoyes users. The usual case for this is running perf top as normal user. (And /proc/sys/kernel/perf_event_paranoid being 1). Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1421736050-5283-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/tui/setup.c')
-rw-r--r--tools/perf/ui/tui/setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index 3c38f25b1695..b77e1d771363 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -17,6 +17,7 @@
static volatile int ui__need_resize;
extern struct perf_error_ops perf_tui_eops;
+extern bool tui_helpline__set;
extern void hist_browser__init_hpp(void);
@@ -159,7 +160,7 @@ out:
void ui__exit(bool wait_for_ok)
{
- if (wait_for_ok)
+ if (wait_for_ok && tui_helpline__set)
ui__question_window("Fatal Error",
ui_helpline__last_msg,
"Press any key...", 0);