Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf ui tui: Register the error callbacks before initializing the widgets

I.e. we want to tell the user about errors found during, for instance,
the ui_browser initialization, so that a call to ui__warning() appears
as a window waiting for a key to be pressed.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ederrwizcl6mfz10vfobl5qq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+4 -4
+4 -4
tools/perf/ui/tui/setup.c
··· 141 141 142 142 SLkp_define_keysym((char *)"^(kB)", SL_KEY_UNTAB); 143 143 144 - ui_helpline__init(); 145 - ui_browser__init(); 146 - tui_progress__init(); 147 - 148 144 signal(SIGSEGV, ui__signal_backtrace); 149 145 signal(SIGFPE, ui__signal_backtrace); 150 146 signal(SIGINT, ui__signal); ··· 148 152 signal(SIGTERM, ui__signal); 149 153 150 154 perf_error__register(&perf_tui_eops); 155 + 156 + ui_helpline__init(); 157 + ui_browser__init(); 158 + tui_progress__init(); 151 159 152 160 hist_browser__init_hpp(); 153 161 out: