forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf ui browser: Use libslang to read keys
Just another step in stopping the use of libnewt in perf. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
- Loading branch information
Showing
9 changed files
with
125 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
#include "../../sort.h" | ||
#include "../../symbol.h" | ||
#include <pthread.h> | ||
#include <newt.h> | ||
|
||
static void ui__error_window(const char *fmt, ...) | ||
{ | ||
|
@@ -265,26 +266,22 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, | |
} | ||
|
||
switch (key) { | ||
case -1: | ||
/* | ||
* FIXME we need to check if it was | ||
* es.reason == NEWT_EXIT_TIMER | ||
*/ | ||
case K_TIMER: | ||
if (timer != NULL) | ||
timer(arg); | ||
|
||
if (delay_secs != 0) | ||
symbol__annotate_decay_histogram(sym, evidx); | ||
continue; | ||
case NEWT_KEY_TAB: | ||
case K_TAB: | ||
if (nd != NULL) { | ||
nd = rb_prev(nd); | ||
if (nd == NULL) | ||
nd = rb_last(&self->entries); | ||
} else | ||
nd = self->curr_hot; | ||
break; | ||
case NEWT_KEY_UNTAB: | ||
case K_UNTAB: | ||
if (nd != NULL) | ||
nd = rb_next(nd); | ||
if (nd == NULL) | ||
|
@@ -299,8 +296,8 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, | |
if (annotate_browser__toggle_source(self)) | ||
ui_helpline__puts(help); | ||
continue; | ||
case NEWT_KEY_ENTER: | ||
case NEWT_KEY_RIGHT: | ||
case K_ENTER: | ||
case K_RIGHT: | ||
if (self->selection == NULL) { | ||
ui_helpline__puts("Huh? No selection. Report to [email protected]"); | ||
continue; | ||
|
@@ -350,8 +347,8 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, | |
timer, arg, delay_secs); | ||
} | ||
continue; | ||
case NEWT_KEY_LEFT: | ||
case NEWT_KEY_ESCAPE: | ||
case K_LEFT: | ||
case K_ESC: | ||
case 'q': | ||
case CTRL('c'): | ||
goto out; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.