diff options
author | Jiri Olsa <jolsa@redhat.com> | 2017-11-06 05:55:52 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-11-16 12:49:46 -0500 |
commit | daf25d4303cbf1795535b6c0b7172ba6f12aa2bd (patch) | |
tree | f81748afa8ac6232024704758329fbc6e344a05b /tools/perf/ui/browsers/annotate.c | |
parent | 0d9579701fee0a482185ab4e8ee7f5ae86f8ae19 (diff) |
perf annotate browser: Rename disasm_line__browser to browser_line
Rename disasm_line__browser function to browser_line, because the browser got
generic and is no longer disasm specific.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171106105552.GB20858@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r-- | tools/perf/ui/browsers/annotate.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 5ed6c158af40..3691dc8cef4c 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c | |||
@@ -69,7 +69,7 @@ struct annotate_browser { | |||
69 | char search_bf[128]; | 69 | char search_bf[128]; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static inline struct browser_line *disasm_line__browser(struct disasm_line *dl) | 72 | static inline struct browser_line *browser_line(struct disasm_line *dl) |
73 | { | 73 | { |
74 | return (void *) dl - sizeof(struct browser_line); | 74 | return (void *) dl - sizeof(struct browser_line); |
75 | } | 75 | } |
@@ -119,7 +119,7 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int | |||
119 | { | 119 | { |
120 | struct annotate_browser *ab = container_of(browser, struct annotate_browser, b); | 120 | struct annotate_browser *ab = container_of(browser, struct annotate_browser, b); |
121 | struct disasm_line *dl = list_entry(entry, struct disasm_line, al.node); | 121 | struct disasm_line *dl = list_entry(entry, struct disasm_line, al.node); |
122 | struct browser_line *bdl = disasm_line__browser(dl); | 122 | struct browser_line *bdl = browser_line(dl); |
123 | bool current_entry = ui_browser__is_current_entry(browser, row); | 123 | bool current_entry = ui_browser__is_current_entry(browser, row); |
124 | bool change_color = (!annotate_browser__opts.hide_src_code && | 124 | bool change_color = (!annotate_browser__opts.hide_src_code && |
125 | (!current_entry || (browser->use_navkeypressed && | 125 | (!current_entry || (browser->use_navkeypressed && |
@@ -319,8 +319,8 @@ static void annotate_browser__draw_current_jump(struct ui_browser *browser) | |||
319 | if (!target) | 319 | if (!target) |
320 | return; | 320 | return; |
321 | 321 | ||
322 | bcursor = disasm_line__browser(cursor); | 322 | bcursor = browser_line(cursor); |
323 | btarget = disasm_line__browser(target); | 323 | btarget = browser_line(target); |
324 | 324 | ||
325 | if (annotate_browser__opts.hide_src_code) { | 325 | if (annotate_browser__opts.hide_src_code) { |
326 | from = bcursor->idx_asm; | 326 | from = bcursor->idx_asm; |
@@ -418,7 +418,7 @@ static void annotate_browser__set_rb_top(struct annotate_browser *browser, | |||
418 | u32 idx; | 418 | u32 idx; |
419 | 419 | ||
420 | pos = rb_entry(nd, struct disasm_line, al.rb_node); | 420 | pos = rb_entry(nd, struct disasm_line, al.rb_node); |
421 | bpos = disasm_line__browser(pos); | 421 | bpos = browser_line(pos); |
422 | 422 | ||
423 | idx = bpos->idx; | 423 | idx = bpos->idx; |
424 | if (annotate_browser__opts.hide_src_code) | 424 | if (annotate_browser__opts.hide_src_code) |
@@ -476,7 +476,7 @@ static bool annotate_browser__toggle_source(struct annotate_browser *browser) | |||
476 | 476 | ||
477 | browser->b.seek(&browser->b, offset, SEEK_CUR); | 477 | browser->b.seek(&browser->b, offset, SEEK_CUR); |
478 | dl = list_entry(browser->b.top, struct disasm_line, al.node); | 478 | dl = list_entry(browser->b.top, struct disasm_line, al.node); |
479 | bdl = disasm_line__browser(dl); | 479 | bdl = browser_line(dl); |
480 | 480 | ||
481 | if (annotate_browser__opts.hide_src_code) { | 481 | if (annotate_browser__opts.hide_src_code) { |
482 | if (bdl->idx_asm < offset) | 482 | if (bdl->idx_asm < offset) |
@@ -1040,7 +1040,7 @@ static void annotate_browser__mark_jump_targets(struct annotate_browser *browser | |||
1040 | if (dlt == NULL) | 1040 | if (dlt == NULL) |
1041 | continue; | 1041 | continue; |
1042 | 1042 | ||
1043 | bdlt = disasm_line__browser(dlt); | 1043 | bdlt = browser_line(dlt); |
1044 | if (++bdlt->jump_sources > browser->max_jump_sources) | 1044 | if (++bdlt->jump_sources > browser->max_jump_sources) |
1045 | browser->max_jump_sources = bdlt->jump_sources; | 1045 | browser->max_jump_sources = bdlt->jump_sources; |
1046 | 1046 | ||
@@ -1119,7 +1119,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, | |||
1119 | 1119 | ||
1120 | if (browser.b.width < line_len) | 1120 | if (browser.b.width < line_len) |
1121 | browser.b.width = line_len; | 1121 | browser.b.width = line_len; |
1122 | bpos = disasm_line__browser(pos); | 1122 | bpos = browser_line(pos); |
1123 | bpos->idx = browser.nr_entries++; | 1123 | bpos->idx = browser.nr_entries++; |
1124 | if (pos->al.offset != -1) { | 1124 | if (pos->al.offset != -1) { |
1125 | bpos->idx_asm = browser.nr_asm_entries++; | 1125 | bpos->idx_asm = browser.nr_asm_entries++; |