diff options
author | Jiri Olsa <jolsa@redhat.com> | 2017-11-06 05:55:36 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-11-16 12:49:46 -0500 |
commit | 0d9579701fee0a482185ab4e8ee7f5ae86f8ae19 (patch) | |
tree | 59ce6a03254ae3b97f0cbcc3059c2408fc02b668 /tools/perf/ui/browsers/annotate.c | |
parent | b15636c62f3a32a8560ea6a32245ec49edd60c6b (diff) |
perf annotate browser: Rename struct browser_disasm_line to browser_line
Rename struct browser_disasm_line to browser_line, because the browser
operates now on generic lines and no longer on disasm lines.
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/20171106105536.GA20858@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 | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 67e5955b3c6f..5ed6c158af40 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c | |||
@@ -25,10 +25,10 @@ struct disasm_line_samples { | |||
25 | #define IPC_WIDTH 6 | 25 | #define IPC_WIDTH 6 |
26 | #define CYCLES_WIDTH 6 | 26 | #define CYCLES_WIDTH 6 |
27 | 27 | ||
28 | struct browser_disasm_line { | 28 | struct browser_line { |
29 | u32 idx; | 29 | u32 idx; |
30 | int idx_asm; | 30 | int idx_asm; |
31 | int jump_sources; | 31 | int jump_sources; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | static struct annotate_browser_opt { | 34 | static struct annotate_browser_opt { |
@@ -69,9 +69,9 @@ struct annotate_browser { | |||
69 | char search_bf[128]; | 69 | char search_bf[128]; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static inline struct browser_disasm_line *disasm_line__browser(struct disasm_line *dl) | 72 | static inline struct browser_line *disasm_line__browser(struct disasm_line *dl) |
73 | { | 73 | { |
74 | return (void *) dl - sizeof(struct browser_disasm_line); | 74 | return (void *) dl - sizeof(struct browser_line); |
75 | } | 75 | } |
76 | 76 | ||
77 | static bool disasm_line__filter(struct ui_browser *browser __maybe_unused, | 77 | static bool disasm_line__filter(struct ui_browser *browser __maybe_unused, |
@@ -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_disasm_line *bdl = disasm_line__browser(dl); | 122 | struct browser_line *bdl = disasm_line__browser(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 && |
@@ -302,7 +302,7 @@ static void annotate_browser__draw_current_jump(struct ui_browser *browser) | |||
302 | { | 302 | { |
303 | struct annotate_browser *ab = container_of(browser, struct annotate_browser, b); | 303 | struct annotate_browser *ab = container_of(browser, struct annotate_browser, b); |
304 | struct disasm_line *cursor = ab->selection, *target; | 304 | struct disasm_line *cursor = ab->selection, *target; |
305 | struct browser_disasm_line *btarget, *bcursor; | 305 | struct browser_line *btarget, *bcursor; |
306 | unsigned int from, to; | 306 | unsigned int from, to; |
307 | struct map_symbol *ms = ab->b.priv; | 307 | struct map_symbol *ms = ab->b.priv; |
308 | struct symbol *sym = ms->sym; | 308 | struct symbol *sym = ms->sym; |
@@ -413,7 +413,7 @@ static void annotate_browser__set_top(struct annotate_browser *browser, | |||
413 | static void annotate_browser__set_rb_top(struct annotate_browser *browser, | 413 | static void annotate_browser__set_rb_top(struct annotate_browser *browser, |
414 | struct rb_node *nd) | 414 | struct rb_node *nd) |
415 | { | 415 | { |
416 | struct browser_disasm_line *bpos; | 416 | struct browser_line *bpos; |
417 | struct disasm_line *pos; | 417 | struct disasm_line *pos; |
418 | u32 idx; | 418 | u32 idx; |
419 | 419 | ||
@@ -471,7 +471,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser, | |||
471 | static bool annotate_browser__toggle_source(struct annotate_browser *browser) | 471 | static bool annotate_browser__toggle_source(struct annotate_browser *browser) |
472 | { | 472 | { |
473 | struct disasm_line *dl; | 473 | struct disasm_line *dl; |
474 | struct browser_disasm_line *bdl; | 474 | struct browser_line *bdl; |
475 | off_t offset = browser->b.index - browser->b.top_idx; | 475 | off_t offset = browser->b.index - browser->b.top_idx; |
476 | 476 | ||
477 | browser->b.seek(&browser->b, offset, SEEK_CUR); | 477 | browser->b.seek(&browser->b, offset, SEEK_CUR); |
@@ -1027,7 +1027,7 @@ static void annotate_browser__mark_jump_targets(struct annotate_browser *browser | |||
1027 | 1027 | ||
1028 | for (offset = 0; offset < size; ++offset) { | 1028 | for (offset = 0; offset < size; ++offset) { |
1029 | struct disasm_line *dl = browser->offsets[offset], *dlt; | 1029 | struct disasm_line *dl = browser->offsets[offset], *dlt; |
1030 | struct browser_disasm_line *bdlt; | 1030 | struct browser_line *bdlt; |
1031 | 1031 | ||
1032 | if (!disasm_line__is_valid_jump(dl, sym)) | 1032 | if (!disasm_line__is_valid_jump(dl, sym)) |
1033 | continue; | 1033 | continue; |
@@ -1099,7 +1099,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, | |||
1099 | nr_pcnt = evsel->nr_members; | 1099 | nr_pcnt = evsel->nr_members; |
1100 | 1100 | ||
1101 | err = symbol__annotate(sym, map, evsel, | 1101 | err = symbol__annotate(sym, map, evsel, |
1102 | sizeof(struct browser_disasm_line), &browser.arch, | 1102 | sizeof(struct browser_line), &browser.arch, |
1103 | perf_evsel__env_cpuid(evsel)); | 1103 | perf_evsel__env_cpuid(evsel)); |
1104 | if (err) { | 1104 | if (err) { |
1105 | char msg[BUFSIZ]; | 1105 | char msg[BUFSIZ]; |
@@ -1114,7 +1114,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, | |||
1114 | browser.start = map__rip_2objdump(map, sym->start); | 1114 | browser.start = map__rip_2objdump(map, sym->start); |
1115 | 1115 | ||
1116 | list_for_each_entry(pos, ¬es->src->source, al.node) { | 1116 | list_for_each_entry(pos, ¬es->src->source, al.node) { |
1117 | struct browser_disasm_line *bpos; | 1117 | struct browser_line *bpos; |
1118 | size_t line_len = strlen(pos->al.line); | 1118 | size_t line_len = strlen(pos->al.line); |
1119 | 1119 | ||
1120 | if (browser.b.width < line_len) | 1120 | if (browser.b.width < line_len) |