From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 03/10] perf ui: Shorten ui_browser->refresh_entries to refresh
Date: Thu, 5 Aug 2010 22:46:10 -0300 [thread overview]
Message-ID: <1281059177-18747-4-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1281059177-18747-1-git-send-email-acme@infradead.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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 fc4a2b3..f98a240 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -280,7 +280,7 @@ struct ui_browser {
void *first_visible_entry, *entries;
u16 top, left, width, height;
void *priv;
- unsigned int (*refresh_entries)(struct ui_browser *self);
+ unsigned int (*refresh)(struct ui_browser *self);
void (*write)(struct ui_browser *self, void *entry, int row);
void (*seek)(struct ui_browser *self,
off_t offset, int whence);
@@ -472,12 +472,12 @@ static int objdump_line__show(struct objdump_line *self, struct list_head *head,
return 0;
}
-static int ui_browser__refresh_entries(struct ui_browser *self)
+static int ui_browser__refresh(struct ui_browser *self)
{
int row;
newtScrollbarSet(self->sb, self->index, self->nr_entries - 1);
- row = self->refresh_entries(self);
+ row = self->refresh(self);
SLsmg_set_color(HE_COLORSET_NORMAL);
SLsmg_fill_region(self->top + row, self->left,
self->height - row, self->width, ' ');
@@ -487,7 +487,7 @@ static int ui_browser__refresh_entries(struct ui_browser *self)
static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es)
{
- if (ui_browser__refresh_entries(self) < 0)
+ if (ui_browser__refresh(self) < 0)
return -1;
while (1) {
@@ -558,7 +558,7 @@ static int ui_browser__run(struct ui_browser *self, struct newtExitStruct *es)
default:
return es->u.key;
}
- if (ui_browser__refresh_entries(self) < 0)
+ if (ui_browser__refresh(self) < 0)
return -1;
}
return 0;
@@ -621,9 +621,9 @@ int hist_entry__tui_annotate(struct hist_entry *self)
ui_helpline__push("Press <- or ESC to exit");
memset(&browser, 0, sizeof(browser));
- browser.entries = &head;
- browser.refresh_entries = hist_entry__annotate_browser_refresh;
- browser.seek = ui_browser__list_head_seek;
+ browser.entries = &head;
+ browser.refresh = hist_entry__annotate_browser_refresh;
+ browser.seek = ui_browser__list_head_seek;
browser.priv = self;
list_for_each_entry(pos, &head, node) {
size_t line_len = strlen(pos->line);
@@ -675,7 +675,7 @@ static int map__browse(struct map *self)
struct map_browser mb = {
.b = {
.entries = &self->dso->symbols[self->type],
- .refresh_entries = ui_browser__rb_tree_refresh,
+ .refresh = ui_browser__rb_tree_refresh,
.seek = ui_browser__rb_tree_seek,
.write = map_browser__write,
},
@@ -720,7 +720,7 @@ struct hist_browser {
static void hist_browser__reset(struct hist_browser *self);
static int hist_browser__run(struct hist_browser *self, const char *title,
struct newtExitStruct *es);
-static unsigned int hist_browser__refresh_entries(struct ui_browser *self);
+static unsigned int hist_browser__refresh(struct ui_browser *self);
static void ui_browser__hists_seek(struct ui_browser *self,
off_t offset, int whence);
@@ -730,7 +730,7 @@ static struct hist_browser *hist_browser__new(struct hists *hists)
if (self) {
self->hists = hists;
- self->b.refresh_entries = hist_browser__refresh_entries;
+ self->b.refresh = hist_browser__refresh;
self->b.seek = ui_browser__hists_seek;
}
@@ -1338,7 +1338,7 @@ static int hist_browser__show_entry(struct hist_browser *self,
return printed;
}
-static unsigned int hist_browser__refresh_entries(struct ui_browser *self)
+static unsigned int hist_browser__refresh(struct ui_browser *self)
{
unsigned row = 0;
struct rb_node *nd;
--
1.6.2.5
next prev parent reply other threads:[~2010-08-06 1:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 1:46 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
2010-08-06 1:46 ` [PATCH 01/10] perf symbols: Store the symbol binding Arnaldo Carvalho de Melo
2010-08-06 1:46 ` [PATCH 02/10] perf ui: Add a map browser Arnaldo Carvalho de Melo
2010-08-06 1:46 ` Arnaldo Carvalho de Melo [this message]
2010-08-06 1:46 ` [PATCH 04/10] perf hists: Handle verbose in hists__sort_list_width Arnaldo Carvalho de Melo
2010-08-06 1:46 ` [PATCH 05/10] perf hists: Fixup addr snprintf width on 32 bit arches Arnaldo Carvalho de Melo
2010-08-06 1:58 ` Joe Perches
2010-08-06 14:29 ` Arnaldo Carvalho de Melo
2010-08-06 15:35 ` Joe Perches
2010-08-06 15:40 ` Joe Perches
2010-08-06 1:46 ` [PATCH 06/10] perf ui: Add search by name/addr to the map__browser Arnaldo Carvalho de Melo
2010-08-06 1:46 ` [PATCH 07/10] perf probe: Remove duplicated #include Arnaldo Carvalho de Melo
2010-08-06 1:46 ` [PATCH 08/10] perf trace: Clean up #includes Arnaldo Carvalho de Melo
2010-08-06 1:46 ` [PATCH 09/10] perf timechart: Adjust confusing if indentation Arnaldo Carvalho de Melo
2010-08-06 1:46 ` [PATCH 10/10] perf report: Speed up exit path Arnaldo Carvalho de Melo
2010-08-06 7:00 ` [GIT PULL 00/10] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281059177-18747-4-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).