diff options
Diffstat (limited to 'tools/perf/util/newt.c')
-rw-r--r-- | tools/perf/util/newt.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 266a9e06525b..9768be31f9c5 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
@@ -450,8 +450,8 @@ static int map_browser__search(struct map_browser *self) | |||
450 | if (sym != NULL) { | 450 | if (sym != NULL) { |
451 | u32 *idx = symbol__browser_index(sym); | 451 | u32 *idx = symbol__browser_index(sym); |
452 | 452 | ||
453 | self->b.first_visible_entry = &sym->rb_node; | 453 | self->b.top = &sym->rb_node; |
454 | self->b.index = self->b.first_visible_entry_idx = *idx; | 454 | self->b.index = self->b.top_idx = *idx; |
455 | } else | 455 | } else |
456 | ui_helpline__fpush("%s not found!", target); | 456 | ui_helpline__fpush("%s not found!", target); |
457 | 457 | ||
@@ -967,7 +967,7 @@ static int hist_browser__show_callchain_node_rb_tree(struct hist_browser *self, | |||
967 | } | 967 | } |
968 | 968 | ||
969 | SLsmg_set_color(color); | 969 | SLsmg_set_color(color); |
970 | SLsmg_gotorc(self->b.top + row, self->b.left); | 970 | SLsmg_gotorc(self->b.y + row, self->b.x); |
971 | slsmg_write_nstring(" ", offset + extra_offset); | 971 | slsmg_write_nstring(" ", offset + extra_offset); |
972 | slsmg_printf("%c ", folded_sign); | 972 | slsmg_printf("%c ", folded_sign); |
973 | slsmg_write_nstring(str, width); | 973 | slsmg_write_nstring(str, width); |
@@ -1030,7 +1030,7 @@ static int hist_browser__show_callchain_node(struct hist_browser *self, | |||
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | s = callchain_list__sym_name(chain, ipstr, sizeof(ipstr)); | 1032 | s = callchain_list__sym_name(chain, ipstr, sizeof(ipstr)); |
1033 | SLsmg_gotorc(self->b.top + row, self->b.left); | 1033 | SLsmg_gotorc(self->b.y + row, self->b.x); |
1034 | SLsmg_set_color(color); | 1034 | SLsmg_set_color(color); |
1035 | slsmg_write_nstring(" ", offset); | 1035 | slsmg_write_nstring(" ", offset); |
1036 | slsmg_printf("%c ", folded_sign); | 1036 | slsmg_printf("%c ", folded_sign); |
@@ -1110,7 +1110,7 @@ static int hist_browser__show_entry(struct hist_browser *self, | |||
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | SLsmg_set_color(color); | 1112 | SLsmg_set_color(color); |
1113 | SLsmg_gotorc(self->b.top + row, self->b.left); | 1113 | SLsmg_gotorc(self->b.y + row, self->b.x); |
1114 | if (symbol_conf.use_callchain) { | 1114 | if (symbol_conf.use_callchain) { |
1115 | slsmg_printf("%c ", folded_sign); | 1115 | slsmg_printf("%c ", folded_sign); |
1116 | width -= 2; | 1116 | width -= 2; |
@@ -1138,10 +1138,10 @@ static unsigned int hist_browser__refresh(struct ui_browser *self) | |||
1138 | struct rb_node *nd; | 1138 | struct rb_node *nd; |
1139 | struct hist_browser *hb = container_of(self, struct hist_browser, b); | 1139 | struct hist_browser *hb = container_of(self, struct hist_browser, b); |
1140 | 1140 | ||
1141 | if (self->first_visible_entry == NULL) | 1141 | if (self->top == NULL) |
1142 | self->first_visible_entry = rb_first(&hb->hists->entries); | 1142 | self->top = rb_first(&hb->hists->entries); |
1143 | 1143 | ||
1144 | for (nd = self->first_visible_entry; nd; nd = rb_next(nd)) { | 1144 | for (nd = self->top; nd; nd = rb_next(nd)) { |
1145 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); | 1145 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); |
1146 | 1146 | ||
1147 | if (h->filtered) | 1147 | if (h->filtered) |
@@ -1244,7 +1244,7 @@ static void ui_browser__hists_seek(struct ui_browser *self, | |||
1244 | nd = hists__filter_entries(rb_first(self->entries)); | 1244 | nd = hists__filter_entries(rb_first(self->entries)); |
1245 | break; | 1245 | break; |
1246 | case SEEK_CUR: | 1246 | case SEEK_CUR: |
1247 | nd = self->first_visible_entry; | 1247 | nd = self->top; |
1248 | goto do_offset; | 1248 | goto do_offset; |
1249 | case SEEK_END: | 1249 | case SEEK_END: |
1250 | nd = hists__filter_prev_entries(rb_last(self->entries)); | 1250 | nd = hists__filter_prev_entries(rb_last(self->entries)); |
@@ -1258,7 +1258,7 @@ static void ui_browser__hists_seek(struct ui_browser *self, | |||
1258 | * Moves not relative to the first visible entry invalidates its | 1258 | * Moves not relative to the first visible entry invalidates its |
1259 | * row_offset: | 1259 | * row_offset: |
1260 | */ | 1260 | */ |
1261 | h = rb_entry(self->first_visible_entry, struct hist_entry, rb_node); | 1261 | h = rb_entry(self->top, struct hist_entry, rb_node); |
1262 | h->row_offset = 0; | 1262 | h->row_offset = 0; |
1263 | 1263 | ||
1264 | /* | 1264 | /* |
@@ -1286,7 +1286,7 @@ do_offset: | |||
1286 | } else { | 1286 | } else { |
1287 | h->row_offset += offset; | 1287 | h->row_offset += offset; |
1288 | offset = 0; | 1288 | offset = 0; |
1289 | self->first_visible_entry = nd; | 1289 | self->top = nd; |
1290 | break; | 1290 | break; |
1291 | } | 1291 | } |
1292 | } | 1292 | } |
@@ -1294,7 +1294,7 @@ do_offset: | |||
1294 | if (nd == NULL) | 1294 | if (nd == NULL) |
1295 | break; | 1295 | break; |
1296 | --offset; | 1296 | --offset; |
1297 | self->first_visible_entry = nd; | 1297 | self->top = nd; |
1298 | } while (offset != 0); | 1298 | } while (offset != 0); |
1299 | } else if (offset < 0) { | 1299 | } else if (offset < 0) { |
1300 | while (1) { | 1300 | while (1) { |
@@ -1307,7 +1307,7 @@ do_offset: | |||
1307 | } else { | 1307 | } else { |
1308 | h->row_offset += offset; | 1308 | h->row_offset += offset; |
1309 | offset = 0; | 1309 | offset = 0; |
1310 | self->first_visible_entry = nd; | 1310 | self->top = nd; |
1311 | break; | 1311 | break; |
1312 | } | 1312 | } |
1313 | } else { | 1313 | } else { |
@@ -1317,7 +1317,7 @@ do_offset: | |||
1317 | } else { | 1317 | } else { |
1318 | h->row_offset = h->nr_rows + offset; | 1318 | h->row_offset = h->nr_rows + offset; |
1319 | offset = 0; | 1319 | offset = 0; |
1320 | self->first_visible_entry = nd; | 1320 | self->top = nd; |
1321 | break; | 1321 | break; |
1322 | } | 1322 | } |
1323 | } | 1323 | } |
@@ -1327,7 +1327,7 @@ do_offset: | |||
1327 | if (nd == NULL) | 1327 | if (nd == NULL) |
1328 | break; | 1328 | break; |
1329 | ++offset; | 1329 | ++offset; |
1330 | self->first_visible_entry = nd; | 1330 | self->top = nd; |
1331 | if (offset == 0) { | 1331 | if (offset == 0) { |
1332 | /* | 1332 | /* |
1333 | * Last unfiltered hist_entry, check if it is | 1333 | * Last unfiltered hist_entry, check if it is |
@@ -1342,7 +1342,7 @@ do_offset: | |||
1342 | first = false; | 1342 | first = false; |
1343 | } | 1343 | } |
1344 | } else { | 1344 | } else { |
1345 | self->first_visible_entry = nd; | 1345 | self->top = nd; |
1346 | h = rb_entry(nd, struct hist_entry, rb_node); | 1346 | h = rb_entry(nd, struct hist_entry, rb_node); |
1347 | h->row_offset = 0; | 1347 | h->row_offset = 0; |
1348 | } | 1348 | } |
@@ -1463,7 +1463,7 @@ static int hist_browser__run(struct hist_browser *self, const char *title, | |||
1463 | switch (es->u.key) { | 1463 | switch (es->u.key) { |
1464 | case 'd': { /* Debug */ | 1464 | case 'd': { /* Debug */ |
1465 | static int seq; | 1465 | static int seq; |
1466 | struct hist_entry *h = rb_entry(self->b.first_visible_entry, | 1466 | struct hist_entry *h = rb_entry(self->b.top, |
1467 | struct hist_entry, rb_node); | 1467 | struct hist_entry, rb_node); |
1468 | ui_helpline__pop(); | 1468 | ui_helpline__pop(); |
1469 | ui_helpline__fpush("%d: nr_ent=(%d,%d), height=%d, idx=%d, fve: idx=%d, row_off=%d, nrows=%d", | 1469 | ui_helpline__fpush("%d: nr_ent=(%d,%d), height=%d, idx=%d, fve: idx=%d, row_off=%d, nrows=%d", |
@@ -1471,7 +1471,7 @@ static int hist_browser__run(struct hist_browser *self, const char *title, | |||
1471 | self->hists->nr_entries, | 1471 | self->hists->nr_entries, |
1472 | self->b.height, | 1472 | self->b.height, |
1473 | self->b.index, | 1473 | self->b.index, |
1474 | self->b.first_visible_entry_idx, | 1474 | self->b.top_idx, |
1475 | h->row_offset, h->nr_rows); | 1475 | h->row_offset, h->nr_rows); |
1476 | } | 1476 | } |
1477 | continue; | 1477 | continue; |