diff options
Diffstat (limited to 'tools/perf/util/newt.c')
| -rw-r--r-- | tools/perf/util/newt.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index fc4a2b3aa65e..f98a2406dd86 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
| @@ -280,7 +280,7 @@ struct ui_browser { | |||
| 280 | void *first_visible_entry, *entries; | 280 | void *first_visible_entry, *entries; |
| 281 | u16 top, left, width, height; | 281 | u16 top, left, width, height; |
| 282 | void *priv; | 282 | void *priv; |
| 283 | unsigned int (*refresh_entries)(struct ui_browser *self); | 283 | unsigned int (*refresh)(struct ui_browser *self); |
| 284 | void (*write)(struct ui_browser *self, void *entry, int row); | 284 | void (*write)(struct ui_browser *self, void *entry, int row); |
| 285 | void (*seek)(struct ui_browser *self, | 285 | void (*seek)(struct ui_browser *self, |
| 286 | off_t offset, int whence); | 286 | off_t offset, int whence); |
| @@ -472,12 +472,12 @@ static int objdump_line__show(struct objdump_line *self, struct list_head *head, | |||
| 472 | return 0; | 472 | return 0; |
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | static int ui_browser__refresh_entries(struct ui_browser *self) | 475 | static int ui_browser__refresh(struct ui_browser *self) |
| 476 | { | 476 | { |
| 477 | int row; | 477 | int row; |
| 478 | 478 | ||
| 479 | newtScrollbarSet(self->sb, self->index, self->nr_entries - 1); | 479 | newtScrollbarSet(self->sb, self->index, self->nr_entries - 1); |
| 480 | row = self->refresh_entries(self); | 480 | row = self->refresh(self); |
| 481 | SLsmg_set_color(HE_COLORSET_NORMAL); | 481 | SLsmg_set_color(HE_COLORSET_NORMAL); |
| 482 | SLsmg_fill_region(self->top + row, self->left, | 482 | SLsmg_fill_region(self->top + row, self->left, |
| 483 | self->height - row, self->width, ' '); | 483 | self->height - row, self->width, ' '); |
| @@ -487,7 +487,7 @@ static int ui_browser__refresh_entries(struct ui_browser *self) | |||
| 487 | 487 | ||
| 488 | static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es) | 488 | static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es) |
| 489 | { | 489 | { |
| 490 | if (ui_browser__refresh_entries(self) < 0) | 490 | if (ui_browser__refresh(self) < 0) |
| 491 | return -1; | 491 | return -1; |
| 492 | 492 | ||
| 493 | while (1) { | 493 | while (1) { |
| @@ -558,7 +558,7 @@ static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es) | |||
| 558 | default: | 558 | default: |
| 559 | return es->u.key; | 559 | return es->u.key; |
| 560 | } | 560 | } |
| 561 | if (ui_browser__refresh_entries(self) < 0) | 561 | if (ui_browser__refresh(self) < 0) |
| 562 | return -1; | 562 | return -1; |
| 563 | } | 563 | } |
| 564 | return 0; | 564 | return 0; |
| @@ -621,9 +621,9 @@ int hist_entry__tui_annotate(struct hist_entry *self) | |||
| 621 | ui_helpline__push("Press <- or ESC to exit"); | 621 | ui_helpline__push("Press <- or ESC to exit"); |
| 622 | 622 | ||
| 623 | memset(&browser, 0, sizeof(browser)); | 623 | memset(&browser, 0, sizeof(browser)); |
| 624 | browser.entries = &head; | 624 | browser.entries = &head; |
| 625 | browser.refresh_entries = hist_entry__annotate_browser_refresh; | 625 | browser.refresh = hist_entry__annotate_browser_refresh; |
| 626 | browser.seek = ui_browser__list_head_seek; | 626 | browser.seek = ui_browser__list_head_seek; |
| 627 | browser.priv = self; | 627 | browser.priv = self; |
| 628 | list_for_each_entry(pos, &head, node) { | 628 | list_for_each_entry(pos, &head, node) { |
| 629 | size_t line_len = strlen(pos->line); | 629 | size_t line_len = strlen(pos->line); |
| @@ -675,7 +675,7 @@ static int map__browse(struct map *self) | |||
| 675 | struct map_browser mb = { | 675 | struct map_browser mb = { |
| 676 | .b = { | 676 | .b = { |
| 677 | .entries = &self->dso->symbols[self->type], | 677 | .entries = &self->dso->symbols[self->type], |
| 678 | .refresh_entries = ui_browser__rb_tree_refresh, | 678 | .refresh = ui_browser__rb_tree_refresh, |
| 679 | .seek = ui_browser__rb_tree_seek, | 679 | .seek = ui_browser__rb_tree_seek, |
| 680 | .write = map_browser__write, | 680 | .write = map_browser__write, |
| 681 | }, | 681 | }, |
| @@ -720,7 +720,7 @@ struct hist_browser { | |||
| 720 | static void hist_browser__reset(struct hist_browser *self); | 720 | static void hist_browser__reset(struct hist_browser *self); |
| 721 | static int hist_browser__run(struct hist_browser *self, const char *title, | 721 | static int hist_browser__run(struct hist_browser *self, const char *title, |
| 722 | struct newtExitStruct *es); | 722 | struct newtExitStruct *es); |
| 723 | static unsigned int hist_browser__refresh_entries(struct ui_browser *self); | 723 | static unsigned int hist_browser__refresh(struct ui_browser *self); |
| 724 | static void ui_browser__hists_seek(struct ui_browser *self, | 724 | static void ui_browser__hists_seek(struct ui_browser *self, |
| 725 | off_t offset, int whence); | 725 | off_t offset, int whence); |
| 726 | 726 | ||
| @@ -730,7 +730,7 @@ static struct hist_browser *hist_browser__new(struct hists *hists) | |||
| 730 | 730 | ||
| 731 | if (self) { | 731 | if (self) { |
| 732 | self->hists = hists; | 732 | self->hists = hists; |
| 733 | self->b.refresh_entries = hist_browser__refresh_entries; | 733 | self->b.refresh = hist_browser__refresh; |
| 734 | self->b.seek = ui_browser__hists_seek; | 734 | self->b.seek = ui_browser__hists_seek; |
| 735 | } | 735 | } |
| 736 | 736 | ||
| @@ -1338,7 +1338,7 @@ static int hist_browser__show_entry(struct hist_browser *self, | |||
| 1338 | return printed; | 1338 | return printed; |
| 1339 | } | 1339 | } |
| 1340 | 1340 | ||
| 1341 | static unsigned int hist_browser__refresh_entries(struct ui_browser *self) | 1341 | static unsigned int hist_browser__refresh(struct ui_browser *self) |
| 1342 | { | 1342 | { |
| 1343 | unsigned row = 0; | 1343 | unsigned row = 0; |
| 1344 | struct rb_node *nd; | 1344 | struct rb_node *nd; |
