diff options
Diffstat (limited to 'tools/perf/util/ui/browsers')
-rw-r--r-- | tools/perf/util/ui/browsers/annotate.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c index 295a9c93f945..57a4c6ef3fd2 100644 --- a/tools/perf/util/ui/browsers/annotate.c +++ b/tools/perf/util/ui/browsers/annotate.c | |||
@@ -69,14 +69,17 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro | |||
69 | if (!self->navkeypressed) | 69 | if (!self->navkeypressed) |
70 | width += 1; | 70 | width += 1; |
71 | 71 | ||
72 | if (!ab->hide_src_code && ol->offset != -1) | ||
73 | if (!current_entry || (self->use_navkeypressed && | ||
74 | !self->navkeypressed)) | ||
75 | ui_browser__set_color(self, HE_COLORSET_CODE); | ||
76 | |||
72 | if (!*ol->line) | 77 | if (!*ol->line) |
73 | slsmg_write_nstring(" ", width - 18); | 78 | slsmg_write_nstring(" ", width - 18); |
74 | else | 79 | else |
75 | slsmg_write_nstring(ol->line, width - 18); | 80 | slsmg_write_nstring(ol->line, width - 18); |
76 | 81 | ||
77 | if (!current_entry) | 82 | if (current_entry) |
78 | ui_browser__set_color(self, HE_COLORSET_CODE); | ||
79 | else | ||
80 | ab->selection = ol; | 83 | ab->selection = ol; |
81 | } | 84 | } |
82 | 85 | ||
@@ -230,9 +233,9 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, | |||
230 | struct rb_node *nd = NULL; | 233 | struct rb_node *nd = NULL; |
231 | struct map_symbol *ms = self->b.priv; | 234 | struct map_symbol *ms = self->b.priv; |
232 | struct symbol *sym = ms->sym; | 235 | struct symbol *sym = ms->sym; |
233 | const char *help = "<-, ESC: exit, TAB/shift+TAB: cycle hottest lines, " | 236 | const char *help = "<-/ESC: Exit, TAB/shift+TAB: Cycle hot lines, " |
234 | "H: Hottest, -> Line action, S -> Toggle source " | 237 | "H: Go to hottest line, ->/ENTER: Line action, " |
235 | "code view"; | 238 | "S: Toggle source code view"; |
236 | int key; | 239 | int key; |
237 | 240 | ||
238 | if (ui_browser__show(&self->b, sym->name, help) < 0) | 241 | if (ui_browser__show(&self->b, sym->name, help) < 0) |
@@ -284,9 +287,11 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, | |||
284 | nd = self->curr_hot; | 287 | nd = self->curr_hot; |
285 | break; | 288 | break; |
286 | case 'H': | 289 | case 'H': |
290 | case 'h': | ||
287 | nd = self->curr_hot; | 291 | nd = self->curr_hot; |
288 | break; | 292 | break; |
289 | case 'S': | 293 | case 'S': |
294 | case 's': | ||
290 | if (annotate_browser__toggle_source(self)) | 295 | if (annotate_browser__toggle_source(self)) |
291 | ui_helpline__puts(help); | 296 | ui_helpline__puts(help); |
292 | continue; | 297 | continue; |
@@ -338,6 +343,7 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, | |||
338 | pthread_mutex_unlock(¬es->lock); | 343 | pthread_mutex_unlock(¬es->lock); |
339 | symbol__tui_annotate(target, ms->map, evidx, | 344 | symbol__tui_annotate(target, ms->map, evidx, |
340 | timer, arg, delay_secs); | 345 | timer, arg, delay_secs); |
346 | ui_browser__show_title(&self->b, sym->name); | ||
341 | } | 347 | } |
342 | continue; | 348 | continue; |
343 | case K_LEFT: | 349 | case K_LEFT: |