Skip to contentSkip to conversation

perf report tui: Fix multi event switching

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Mar 8, 2011 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  a03f35ceeb3d279da35c5a914ac01a4b1effb0a1
Gitweb:     http://git.kernel.org/tip/a03f35ceeb3d279da35c5a914ac01a4b1effb0a1
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Thu, 3 Mar 2011 16:43:03 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Sat, 5 Mar 2011 22:31:04 -0300

perf report tui: Fix multi event switching

TAB/UNTAB were not hotkeys, so didn't exit hists__browse back to hists__tui_browse_tree, allowing just the first event to be browsed.

Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Tom Zanussi <[email protected]>
Cc William Cohen <[email protected]>

LKML-Reference: <new-submission>

---
 tools/perf/util/ui/browsers/hists.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
tools/perf/util/ui/browsers/hists.c +4 -1
index 497b3c4..c27ab35 100644
@@ -292,7 +292,8 @@ static int hist_browser__run(struct hist_browser *self, const char *title)
 {
 	int key;
 	int exit_keys[] = { 'a', '?', 'h', 'C', 'd', 'D', 'E', 't',
-			    NEWT_KEY_ENTER, NEWT_KEY_RIGHT, NEWT_KEY_LEFT, 0, };
+			    NEWT_KEY_ENTER, NEWT_KEY_RIGHT, NEWT_KEY_LEFT,
+			    NEWT_KEY_TAB, NEWT_KEY_UNTAB, 0, };
 
 	self->b.entries = &self->hists->entries;
 	self->b.nr_entries = self->hists->nr_entries;
@@ -859,6 +860,7 @@ int hists__browse(struct hists *self, const char *helpline,
 					"E         Expand all callchains\n"
 					"d         Zoom into current DSO\n"
 					"t         Zoom into current Thread\n"
+					"TAB/UNTAB Switch events\n"
 					"q/CTRL+C  Exit browser");
 			continue;
 		case NEWT_KEY_ENTER:
@@ -997,6 +999,7 @@ int hists__tui_browse_tree(struct rb_root *self, const char *help, int evidx)
 			if (nd == first)
 				continue;
 			nd = rb_prev(nd);
+			break;
 		default:
 			return key;
 		}