diff options
Diffstat (limited to 'tools/perf/util/ui/browsers')
-rw-r--r-- | tools/perf/util/ui/browsers/annotate.c | 8 | ||||
-rw-r--r-- | tools/perf/util/ui/browsers/hists.c | 5 | ||||
-rw-r--r-- | tools/perf/util/ui/browsers/map.c | 10 |
3 files changed, 11 insertions, 12 deletions
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c index 73e78ef..55ff792 100644 --- a/tools/perf/util/ui/browsers/annotate.c +++ b/tools/perf/util/ui/browsers/annotate.c @@ -141,10 +141,10 @@ static int annotate_browser__run(struct annotate_browser *self, struct rb_node *nd; struct hist_entry *he = self->b.priv; - if (ui_browser__show(&self->b, he->ms.sym->name) < 0) + if (ui_browser__show(&self->b, he->ms.sym->name, + "<- or ESC: exit, TAB/shift+TAB: cycle thru samples") < 0) return -1; - ui_helpline__fpush("<- or ESC: exit, TAB/shift+TAB: cycle thru samples"); newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT); nd = self->curr_hot; @@ -177,9 +177,7 @@ static int annotate_browser__run(struct annotate_browser *self, } } out: - newtFormDestroy(self->b.form); - newtPopWindow(); - ui_helpline__pop(); + ui_browser__hide(&self->b); return 0; } diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index cee7998..dd512b7 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c @@ -211,7 +211,8 @@ static int hist_browser__run(struct hist_browser *self, const char *title, nr_events, unit); newtDrawRootText(0, 0, str); - if (ui_browser__show(&self->b, title) < 0) + if (ui_browser__show(&self->b, title, + "Press '?' for help on key bindings") < 0) return -1; newtFormAddHotKey(self->b.form, 'A'); @@ -253,6 +254,8 @@ static int hist_browser__run(struct hist_browser *self, const char *title, return 0; } } + + ui_browser__hide(&self->b); return 0; } diff --git a/tools/perf/util/ui/browsers/map.c b/tools/perf/util/ui/browsers/map.c index b79f0c9..142b825 100644 --- a/tools/perf/util/ui/browsers/map.c +++ b/tools/perf/util/ui/browsers/map.c @@ -100,11 +100,11 @@ static int map_browser__search(struct map_browser *self) static int map_browser__run(struct map_browser *self, struct newtExitStruct *es) { - if (ui_browser__show(&self->b, self->map->dso->long_name) < 0) + if (ui_browser__show(&self->b, self->map->dso->long_name, + "Press <- or ESC to exit, %s / to search", + verbose ? "" : "restart with -v to use") < 0) return -1; - ui_helpline__fpush("Press <- or ESC to exit, %s / to search", - verbose ? "" : "restart with -v to use"); newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT); newtFormAddHotKey(self->b.form, NEWT_KEY_ENTER); if (verbose) @@ -121,9 +121,7 @@ static int map_browser__run(struct map_browser *self, struct newtExitStruct *es) break; } - newtFormDestroy(self->b.form); - newtPopWindow(); - ui_helpline__pop(); + ui_browser__hide(&self->b); return 0; } |