diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-10-22 15:44:17 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-10-22 15:44:17 -0400 |
commit | 464b01a48eb6be48bc58332e029760b5e40ea119 (patch) | |
tree | ceccde0a188cd9860b44696de8b5524aa0073805 /tools | |
parent | 39ff7cdb5a5e6b75dd049255615828c6531cd109 (diff) |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/ui/tui/setup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c index 60d1f29b4b50..7dfeba0a91f3 100644 --- a/tools/perf/ui/tui/setup.c +++ b/tools/perf/ui/tui/setup.c | |||
@@ -141,10 +141,6 @@ int ui__init(void) | |||
141 | 141 | ||
142 | SLkp_define_keysym((char *)"^(kB)", SL_KEY_UNTAB); | 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 | signal(SIGSEGV, ui__signal_backtrace); | 144 | signal(SIGSEGV, ui__signal_backtrace); |
149 | signal(SIGFPE, ui__signal_backtrace); | 145 | signal(SIGFPE, ui__signal_backtrace); |
150 | signal(SIGINT, ui__signal); | 146 | signal(SIGINT, ui__signal); |
@@ -153,6 +149,10 @@ int ui__init(void) | |||
153 | 149 | ||
154 | perf_error__register(&perf_tui_eops); | 150 | perf_error__register(&perf_tui_eops); |
155 | 151 | ||
152 | ui_helpline__init(); | ||
153 | ui_browser__init(); | ||
154 | tui_progress__init(); | ||
155 | |||
156 | hist_browser__init_hpp(); | 156 | hist_browser__init_hpp(); |
157 | out: | 157 | out: |
158 | return err; | 158 | return err; |