diff options
Diffstat (limited to 'tools/perf/util/ui/browsers/hists.c')
-rw-r--r-- | tools/perf/util/ui/browsers/hists.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index fdc3c90696dc..603d6ee5a0d7 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c | |||
@@ -301,7 +301,6 @@ static int hist_browser__run(struct hist_browser *self, const char *ev_name, | |||
301 | void(*timer)(void *arg), void *arg, int delay_secs) | 301 | void(*timer)(void *arg), void *arg, int delay_secs) |
302 | { | 302 | { |
303 | int key; | 303 | int key; |
304 | int delay_msecs = delay_secs * 1000; | ||
305 | char title[160]; | 304 | char title[160]; |
306 | int sym_exit_keys[] = { 'a', 'h', 'C', 'd', 'E', 't', 0, }; | 305 | int sym_exit_keys[] = { 'a', 'h', 'C', 'd', 'E', 't', 0, }; |
307 | int exit_keys[] = { '?', 'h', 'D', NEWT_KEY_LEFT, NEWT_KEY_RIGHT, | 306 | int exit_keys[] = { '?', 'h', 'D', NEWT_KEY_LEFT, NEWT_KEY_RIGHT, |
@@ -318,15 +317,12 @@ static int hist_browser__run(struct hist_browser *self, const char *ev_name, | |||
318 | "Press '?' for help on key bindings") < 0) | 317 | "Press '?' for help on key bindings") < 0) |
319 | return -1; | 318 | return -1; |
320 | 319 | ||
321 | if (timer != NULL) | ||
322 | newtFormSetTimer(self->b.form, delay_msecs); | ||
323 | |||
324 | ui_browser__add_exit_keys(&self->b, exit_keys); | 320 | ui_browser__add_exit_keys(&self->b, exit_keys); |
325 | if (self->has_symbols) | 321 | if (self->has_symbols) |
326 | ui_browser__add_exit_keys(&self->b, sym_exit_keys); | 322 | ui_browser__add_exit_keys(&self->b, sym_exit_keys); |
327 | 323 | ||
328 | while (1) { | 324 | while (1) { |
329 | key = ui_browser__run(&self->b); | 325 | key = ui_browser__run(&self->b, delay_secs); |
330 | 326 | ||
331 | switch (key) { | 327 | switch (key) { |
332 | case -1: | 328 | case -1: |
@@ -1061,7 +1057,6 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu, | |||
1061 | void(*timer)(void *arg), void *arg, int delay_secs) | 1057 | void(*timer)(void *arg), void *arg, int delay_secs) |
1062 | { | 1058 | { |
1063 | int exit_keys[] = { NEWT_KEY_ENTER, NEWT_KEY_RIGHT, 0, }; | 1059 | int exit_keys[] = { NEWT_KEY_ENTER, NEWT_KEY_RIGHT, 0, }; |
1064 | int delay_msecs = delay_secs * 1000; | ||
1065 | struct perf_evlist *evlist = menu->b.priv; | 1060 | struct perf_evlist *evlist = menu->b.priv; |
1066 | struct perf_evsel *pos; | 1061 | struct perf_evsel *pos; |
1067 | const char *ev_name, *title = "Available samples"; | 1062 | const char *ev_name, *title = "Available samples"; |
@@ -1071,13 +1066,10 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu, | |||
1071 | "ESC: exit, ENTER|->: Browse histograms") < 0) | 1066 | "ESC: exit, ENTER|->: Browse histograms") < 0) |
1072 | return -1; | 1067 | return -1; |
1073 | 1068 | ||
1074 | if (timer != NULL) | ||
1075 | newtFormSetTimer(menu->b.form, delay_msecs); | ||
1076 | |||
1077 | ui_browser__add_exit_keys(&menu->b, exit_keys); | 1069 | ui_browser__add_exit_keys(&menu->b, exit_keys); |
1078 | 1070 | ||
1079 | while (1) { | 1071 | while (1) { |
1080 | key = ui_browser__run(&menu->b); | 1072 | key = ui_browser__run(&menu->b, delay_secs); |
1081 | 1073 | ||
1082 | switch (key) { | 1074 | switch (key) { |
1083 | case -1: | 1075 | case -1: |