aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-15 14:24:39 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-16 11:09:59 -0400
commit29ed6e76b4ca81103f31c8316f9e4cfcf134572f (patch)
tree899c3a3262d5f84ecdb7e45d2f21f33c8dea827e /tools/perf/ui/browsers/annotate.c
parenta385ec4f11bdcf81af094c03e2444ee9b7fad2e5 (diff)
perf annotate: Rename objdump_line to disasm_line
We want to move away from using 'objdump -dS' as the only disassembler supported. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-lsn9pjuxxm5ezsubyhkmprw7@git.kernel.org 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.c179
1 files changed, 88 insertions, 91 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 4db5186472b5..bc540b1576c3 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -15,7 +15,7 @@ struct annotate_browser {
15 struct ui_browser b; 15 struct ui_browser b;
16 struct rb_root entries; 16 struct rb_root entries;
17 struct rb_node *curr_hot; 17 struct rb_node *curr_hot;
18 struct objdump_line *selection; 18 struct disasm_line *selection;
19 u64 start; 19 u64 start;
20 int nr_asm_entries; 20 int nr_asm_entries;
21 int nr_entries; 21 int nr_entries;
@@ -25,26 +25,25 @@ struct annotate_browser {
25 char search_bf[128]; 25 char search_bf[128];
26}; 26};
27 27
28struct objdump_line_rb_node { 28struct disasm_line_rb_node {
29 struct rb_node rb_node; 29 struct rb_node rb_node;
30 double percent; 30 double percent;
31 u32 idx; 31 u32 idx;
32 int idx_asm; 32 int idx_asm;
33}; 33};
34 34
35static inline 35static inline struct disasm_line_rb_node *disasm_line__rb(struct disasm_line *dl)
36struct objdump_line_rb_node *objdump_line__rb(struct objdump_line *self)
37{ 36{
38 return (struct objdump_line_rb_node *)(self + 1); 37 return (struct disasm_line_rb_node *)(dl + 1);
39} 38}
40 39
41static bool objdump_line__filter(struct ui_browser *browser, void *entry) 40static bool disasm_line__filter(struct ui_browser *browser, void *entry)
42{ 41{
43 struct annotate_browser *ab = container_of(browser, struct annotate_browser, b); 42 struct annotate_browser *ab = container_of(browser, struct annotate_browser, b);
44 43
45 if (ab->hide_src_code) { 44 if (ab->hide_src_code) {
46 struct objdump_line *ol = list_entry(entry, struct objdump_line, node); 45 struct disasm_line *dl = list_entry(entry, struct disasm_line, node);
47 return ol->offset == -1; 46 return dl->offset == -1;
48 } 47 }
49 48
50 return false; 49 return false;
@@ -53,17 +52,17 @@ static bool objdump_line__filter(struct ui_browser *browser, void *entry)
53static void annotate_browser__write(struct ui_browser *self, void *entry, int row) 52static void annotate_browser__write(struct ui_browser *self, void *entry, int row)
54{ 53{
55 struct annotate_browser *ab = container_of(self, struct annotate_browser, b); 54 struct annotate_browser *ab = container_of(self, struct annotate_browser, b);
56 struct objdump_line *ol = list_entry(entry, struct objdump_line, node); 55 struct disasm_line *dl = list_entry(entry, struct disasm_line, node);
57 bool current_entry = ui_browser__is_current_entry(self, row); 56 bool current_entry = ui_browser__is_current_entry(self, row);
58 bool change_color = (!ab->hide_src_code && 57 bool change_color = (!ab->hide_src_code &&
59 (!current_entry || (self->use_navkeypressed && 58 (!current_entry || (self->use_navkeypressed &&
60 !self->navkeypressed))); 59 !self->navkeypressed)));
61 int width = self->width; 60 int width = self->width;
62 61
63 if (ol->offset != -1) { 62 if (dl->offset != -1) {
64 struct objdump_line_rb_node *olrb = objdump_line__rb(ol); 63 struct disasm_line_rb_node *dlrb = disasm_line__rb(dl);
65 ui_browser__set_percent_color(self, olrb->percent, current_entry); 64 ui_browser__set_percent_color(self, dlrb->percent, current_entry);
66 slsmg_printf(" %7.2f ", olrb->percent); 65 slsmg_printf(" %7.2f ", dlrb->percent);
67 } else { 66 } else {
68 ui_browser__set_percent_color(self, 0, current_entry); 67 ui_browser__set_percent_color(self, 0, current_entry);
69 slsmg_write_nstring(" ", 9); 68 slsmg_write_nstring(" ", 9);
@@ -76,16 +75,16 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
76 if (!self->navkeypressed) 75 if (!self->navkeypressed)
77 width += 1; 76 width += 1;
78 77
79 if (ol->offset != -1 && change_color) 78 if (dl->offset != -1 && change_color)
80 ui_browser__set_color(self, HE_COLORSET_CODE); 79 ui_browser__set_color(self, HE_COLORSET_CODE);
81 80
82 if (!*ol->line) 81 if (!*dl->line)
83 slsmg_write_nstring(" ", width - 18); 82 slsmg_write_nstring(" ", width - 18);
84 else if (ol->offset == -1) 83 else if (dl->offset == -1)
85 slsmg_write_nstring(ol->line, width - 18); 84 slsmg_write_nstring(dl->line, width - 18);
86 else { 85 else {
87 char bf[64]; 86 char bf[64];
88 u64 addr = ol->offset; 87 u64 addr = dl->offset;
89 int printed, color = -1; 88 int printed, color = -1;
90 89
91 if (!ab->use_offset) 90 if (!ab->use_offset)
@@ -97,28 +96,27 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
97 slsmg_write_nstring(bf, printed); 96 slsmg_write_nstring(bf, printed);
98 if (change_color) 97 if (change_color)
99 ui_browser__set_color(self, color); 98 ui_browser__set_color(self, color);
100 slsmg_write_nstring(ol->line, width - 18 - printed); 99 slsmg_write_nstring(dl->line, width - 18 - printed);
101 } 100 }
102 101
103 if (current_entry) 102 if (current_entry)
104 ab->selection = ol; 103 ab->selection = dl;
105} 104}
106 105
107static double objdump_line__calc_percent(struct objdump_line *self, 106static double disasm_line__calc_percent(struct disasm_line *dl, struct symbol *sym, int evidx)
108 struct symbol *sym, int evidx)
109{ 107{
110 double percent = 0.0; 108 double percent = 0.0;
111 109
112 if (self->offset != -1) { 110 if (dl->offset != -1) {
113 int len = sym->end - sym->start; 111 int len = sym->end - sym->start;
114 unsigned int hits = 0; 112 unsigned int hits = 0;
115 struct annotation *notes = symbol__annotation(sym); 113 struct annotation *notes = symbol__annotation(sym);
116 struct source_line *src_line = notes->src->lines; 114 struct source_line *src_line = notes->src->lines;
117 struct sym_hist *h = annotation__histogram(notes, evidx); 115 struct sym_hist *h = annotation__histogram(notes, evidx);
118 s64 offset = self->offset; 116 s64 offset = dl->offset;
119 struct objdump_line *next; 117 struct disasm_line *next;
120 118
121 next = objdump__get_next_ip_line(&notes->src->source, self); 119 next = disasm__get_next_ip_line(&notes->src->source, dl);
122 while (offset < (s64)len && 120 while (offset < (s64)len &&
123 (next == NULL || offset < next->offset)) { 121 (next == NULL || offset < next->offset)) {
124 if (src_line) { 122 if (src_line) {
@@ -139,27 +137,26 @@ static double objdump_line__calc_percent(struct objdump_line *self,
139 return percent; 137 return percent;
140} 138}
141 139
142static void objdump__insert_line(struct rb_root *self, 140static void disasm_rb_tree__insert(struct rb_root *root, struct disasm_line_rb_node *dlrb)
143 struct objdump_line_rb_node *line)
144{ 141{
145 struct rb_node **p = &self->rb_node; 142 struct rb_node **p = &root->rb_node;
146 struct rb_node *parent = NULL; 143 struct rb_node *parent = NULL;
147 struct objdump_line_rb_node *l; 144 struct disasm_line_rb_node *l;
148 145
149 while (*p != NULL) { 146 while (*p != NULL) {
150 parent = *p; 147 parent = *p;
151 l = rb_entry(parent, struct objdump_line_rb_node, rb_node); 148 l = rb_entry(parent, struct disasm_line_rb_node, rb_node);
152 if (line->percent < l->percent) 149 if (dlrb->percent < l->percent)
153 p = &(*p)->rb_left; 150 p = &(*p)->rb_left;
154 else 151 else
155 p = &(*p)->rb_right; 152 p = &(*p)->rb_right;
156 } 153 }
157 rb_link_node(&line->rb_node, parent, p); 154 rb_link_node(&dlrb->rb_node, parent, p);
158 rb_insert_color(&line->rb_node, self); 155 rb_insert_color(&dlrb->rb_node, root);
159} 156}
160 157
161static void annotate_browser__set_top(struct annotate_browser *self, 158static void annotate_browser__set_top(struct annotate_browser *self,
162 struct objdump_line *pos, u32 idx) 159 struct disasm_line *pos, u32 idx)
163{ 160{
164 unsigned back; 161 unsigned back;
165 162
@@ -168,9 +165,9 @@ static void annotate_browser__set_top(struct annotate_browser *self,
168 self->b.top_idx = self->b.index = idx; 165 self->b.top_idx = self->b.index = idx;
169 166
170 while (self->b.top_idx != 0 && back != 0) { 167 while (self->b.top_idx != 0 && back != 0) {
171 pos = list_entry(pos->node.prev, struct objdump_line, node); 168 pos = list_entry(pos->node.prev, struct disasm_line, node);
172 169
173 if (objdump_line__filter(&self->b, &pos->node)) 170 if (disasm_line__filter(&self->b, &pos->node))
174 continue; 171 continue;
175 172
176 --self->b.top_idx; 173 --self->b.top_idx;
@@ -184,11 +181,11 @@ static void annotate_browser__set_top(struct annotate_browser *self,
184static void annotate_browser__set_rb_top(struct annotate_browser *browser, 181static void annotate_browser__set_rb_top(struct annotate_browser *browser,
185 struct rb_node *nd) 182 struct rb_node *nd)
186{ 183{
187 struct objdump_line_rb_node *rbpos; 184 struct disasm_line_rb_node *rbpos;
188 struct objdump_line *pos; 185 struct disasm_line *pos;
189 186
190 rbpos = rb_entry(nd, struct objdump_line_rb_node, rb_node); 187 rbpos = rb_entry(nd, struct disasm_line_rb_node, rb_node);
191 pos = ((struct objdump_line *)rbpos) - 1; 188 pos = ((struct disasm_line *)rbpos) - 1;
192 annotate_browser__set_top(browser, pos, rbpos->idx); 189 annotate_browser__set_top(browser, pos, rbpos->idx);
193 browser->curr_hot = nd; 190 browser->curr_hot = nd;
194} 191}
@@ -199,20 +196,20 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
199 struct map_symbol *ms = browser->b.priv; 196 struct map_symbol *ms = browser->b.priv;
200 struct symbol *sym = ms->sym; 197 struct symbol *sym = ms->sym;
201 struct annotation *notes = symbol__annotation(sym); 198 struct annotation *notes = symbol__annotation(sym);
202 struct objdump_line *pos; 199 struct disasm_line *pos;
203 200
204 browser->entries = RB_ROOT; 201 browser->entries = RB_ROOT;
205 202
206 pthread_mutex_lock(&notes->lock); 203 pthread_mutex_lock(&notes->lock);
207 204
208 list_for_each_entry(pos, &notes->src->source, node) { 205 list_for_each_entry(pos, &notes->src->source, node) {
209 struct objdump_line_rb_node *rbpos = objdump_line__rb(pos); 206 struct disasm_line_rb_node *rbpos = disasm_line__rb(pos);
210 rbpos->percent = objdump_line__calc_percent(pos, sym, evidx); 207 rbpos->percent = disasm_line__calc_percent(pos, sym, evidx);
211 if (rbpos->percent < 0.01) { 208 if (rbpos->percent < 0.01) {
212 RB_CLEAR_NODE(&rbpos->rb_node); 209 RB_CLEAR_NODE(&rbpos->rb_node);
213 continue; 210 continue;
214 } 211 }
215 objdump__insert_line(&browser->entries, rbpos); 212 disasm_rb_tree__insert(&browser->entries, rbpos);
216 } 213 }
217 pthread_mutex_unlock(&notes->lock); 214 pthread_mutex_unlock(&notes->lock);
218 215
@@ -221,38 +218,38 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
221 218
222static bool annotate_browser__toggle_source(struct annotate_browser *browser) 219static bool annotate_browser__toggle_source(struct annotate_browser *browser)
223{ 220{
224 struct objdump_line *ol; 221 struct disasm_line *dl;
225 struct objdump_line_rb_node *olrb; 222 struct disasm_line_rb_node *dlrb;
226 off_t offset = browser->b.index - browser->b.top_idx; 223 off_t offset = browser->b.index - browser->b.top_idx;
227 224
228 browser->b.seek(&browser->b, offset, SEEK_CUR); 225 browser->b.seek(&browser->b, offset, SEEK_CUR);
229 ol = list_entry(browser->b.top, struct objdump_line, node); 226 dl = list_entry(browser->b.top, struct disasm_line, node);
230 olrb = objdump_line__rb(ol); 227 dlrb = disasm_line__rb(dl);
231 228
232 if (browser->hide_src_code) { 229 if (browser->hide_src_code) {
233 if (olrb->idx_asm < offset) 230 if (dlrb->idx_asm < offset)
234 offset = olrb->idx; 231 offset = dlrb->idx;
235 232
236 browser->b.nr_entries = browser->nr_entries; 233 browser->b.nr_entries = browser->nr_entries;
237 browser->hide_src_code = false; 234 browser->hide_src_code = false;
238 browser->b.seek(&browser->b, -offset, SEEK_CUR); 235 browser->b.seek(&browser->b, -offset, SEEK_CUR);
239 browser->b.top_idx = olrb->idx - offset; 236 browser->b.top_idx = dlrb->idx - offset;
240 browser->b.index = olrb->idx; 237 browser->b.index = dlrb->idx;
241 } else { 238 } else {
242 if (olrb->idx_asm < 0) { 239 if (dlrb->idx_asm < 0) {
243 ui_helpline__puts("Only available for assembly lines."); 240 ui_helpline__puts("Only available for assembly lines.");
244 browser->b.seek(&browser->b, -offset, SEEK_CUR); 241 browser->b.seek(&browser->b, -offset, SEEK_CUR);
245 return false; 242 return false;
246 } 243 }
247 244
248 if (olrb->idx_asm < offset) 245 if (dlrb->idx_asm < offset)
249 offset = olrb->idx_asm; 246 offset = dlrb->idx_asm;
250 247
251 browser->b.nr_entries = browser->nr_asm_entries; 248 browser->b.nr_entries = browser->nr_asm_entries;
252 browser->hide_src_code = true; 249 browser->hide_src_code = true;
253 browser->b.seek(&browser->b, -offset, SEEK_CUR); 250 browser->b.seek(&browser->b, -offset, SEEK_CUR);
254 browser->b.top_idx = olrb->idx_asm - offset; 251 browser->b.top_idx = dlrb->idx_asm - offset;
255 browser->b.index = olrb->idx_asm; 252 browser->b.index = dlrb->idx_asm;
256 } 253 }
257 254
258 return true; 255 return true;
@@ -302,20 +299,20 @@ static bool annotate_browser__callq(struct annotate_browser *browser,
302 return true; 299 return true;
303} 300}
304 301
305static struct objdump_line * 302static
306 annotate_browser__find_offset(struct annotate_browser *browser, 303struct disasm_line *annotate_browser__find_offset(struct annotate_browser *browser,
307 s64 offset, s64 *idx) 304 s64 offset, s64 *idx)
308{ 305{
309 struct map_symbol *ms = browser->b.priv; 306 struct map_symbol *ms = browser->b.priv;
310 struct symbol *sym = ms->sym; 307 struct symbol *sym = ms->sym;
311 struct annotation *notes = symbol__annotation(sym); 308 struct annotation *notes = symbol__annotation(sym);
312 struct objdump_line *pos; 309 struct disasm_line *pos;
313 310
314 *idx = 0; 311 *idx = 0;
315 list_for_each_entry(pos, &notes->src->source, node) { 312 list_for_each_entry(pos, &notes->src->source, node) {
316 if (pos->offset == offset) 313 if (pos->offset == offset)
317 return pos; 314 return pos;
318 if (!objdump_line__filter(&browser->b, &pos->node)) 315 if (!disasm_line__filter(&browser->b, &pos->node))
319 ++*idx; 316 ++*idx;
320 } 317 }
321 318
@@ -325,7 +322,7 @@ static struct objdump_line *
325static bool annotate_browser__jump(struct annotate_browser *browser) 322static bool annotate_browser__jump(struct annotate_browser *browser)
326{ 323{
327 const char *jumps[] = { "je ", "jne ", "ja ", "jmpq ", "js ", "jmp ", NULL }; 324 const char *jumps[] = { "je ", "jne ", "ja ", "jmpq ", "js ", "jmp ", NULL };
328 struct objdump_line *line; 325 struct disasm_line *dl;
329 s64 idx, offset; 326 s64 idx, offset;
330 char *s = NULL; 327 char *s = NULL;
331 int i = 0; 328 int i = 0;
@@ -346,29 +343,29 @@ static bool annotate_browser__jump(struct annotate_browser *browser)
346 } 343 }
347 344
348 offset = strtoll(s, NULL, 16); 345 offset = strtoll(s, NULL, 16);
349 line = annotate_browser__find_offset(browser, offset, &idx); 346 dl = annotate_browser__find_offset(browser, offset, &idx);
350 if (line == NULL) { 347 if (dl == NULL) {
351 ui_helpline__puts("Invallid jump offset"); 348 ui_helpline__puts("Invallid jump offset");
352 return true; 349 return true;
353 } 350 }
354 351
355 annotate_browser__set_top(browser, line, idx); 352 annotate_browser__set_top(browser, dl, idx);
356 353
357 return true; 354 return true;
358} 355}
359 356
360static struct objdump_line * 357static
361 annotate_browser__find_string(struct annotate_browser *browser, 358struct disasm_line *annotate_browser__find_string(struct annotate_browser *browser,
362 char *s, s64 *idx) 359 char *s, s64 *idx)
363{ 360{
364 struct map_symbol *ms = browser->b.priv; 361 struct map_symbol *ms = browser->b.priv;
365 struct symbol *sym = ms->sym; 362 struct symbol *sym = ms->sym;
366 struct annotation *notes = symbol__annotation(sym); 363 struct annotation *notes = symbol__annotation(sym);
367 struct objdump_line *pos = browser->selection; 364 struct disasm_line *pos = browser->selection;
368 365
369 *idx = browser->b.index; 366 *idx = browser->b.index;
370 list_for_each_entry_continue(pos, &notes->src->source, node) { 367 list_for_each_entry_continue(pos, &notes->src->source, node) {
371 if (objdump_line__filter(&browser->b, &pos->node)) 368 if (disasm_line__filter(&browser->b, &pos->node))
372 continue; 369 continue;
373 370
374 ++*idx; 371 ++*idx;
@@ -382,32 +379,32 @@ static struct objdump_line *
382 379
383static bool __annotate_browser__search(struct annotate_browser *browser) 380static bool __annotate_browser__search(struct annotate_browser *browser)
384{ 381{
385 struct objdump_line *line; 382 struct disasm_line *dl;
386 s64 idx; 383 s64 idx;
387 384
388 line = annotate_browser__find_string(browser, browser->search_bf, &idx); 385 dl = annotate_browser__find_string(browser, browser->search_bf, &idx);
389 if (line == NULL) { 386 if (dl == NULL) {
390 ui_helpline__puts("String not found!"); 387 ui_helpline__puts("String not found!");
391 return false; 388 return false;
392 } 389 }
393 390
394 annotate_browser__set_top(browser, line, idx); 391 annotate_browser__set_top(browser, dl, idx);
395 browser->searching_backwards = false; 392 browser->searching_backwards = false;
396 return true; 393 return true;
397} 394}
398 395
399static struct objdump_line * 396static
400 annotate_browser__find_string_reverse(struct annotate_browser *browser, 397struct disasm_line *annotate_browser__find_string_reverse(struct annotate_browser *browser,
401 char *s, s64 *idx) 398 char *s, s64 *idx)
402{ 399{
403 struct map_symbol *ms = browser->b.priv; 400 struct map_symbol *ms = browser->b.priv;
404 struct symbol *sym = ms->sym; 401 struct symbol *sym = ms->sym;
405 struct annotation *notes = symbol__annotation(sym); 402 struct annotation *notes = symbol__annotation(sym);
406 struct objdump_line *pos = browser->selection; 403 struct disasm_line *pos = browser->selection;
407 404
408 *idx = browser->b.index; 405 *idx = browser->b.index;
409 list_for_each_entry_continue_reverse(pos, &notes->src->source, node) { 406 list_for_each_entry_continue_reverse(pos, &notes->src->source, node) {
410 if (objdump_line__filter(&browser->b, &pos->node)) 407 if (disasm_line__filter(&browser->b, &pos->node))
411 continue; 408 continue;
412 409
413 --*idx; 410 --*idx;
@@ -421,16 +418,16 @@ static struct objdump_line *
421 418
422static bool __annotate_browser__search_reverse(struct annotate_browser *browser) 419static bool __annotate_browser__search_reverse(struct annotate_browser *browser)
423{ 420{
424 struct objdump_line *line; 421 struct disasm_line *dl;
425 s64 idx; 422 s64 idx;
426 423
427 line = annotate_browser__find_string_reverse(browser, browser->search_bf, &idx); 424 dl = annotate_browser__find_string_reverse(browser, browser->search_bf, &idx);
428 if (line == NULL) { 425 if (dl == NULL) {
429 ui_helpline__puts("String not found!"); 426 ui_helpline__puts("String not found!");
430 return false; 427 return false;
431 } 428 }
432 429
433 annotate_browser__set_top(browser, line, idx); 430 annotate_browser__set_top(browser, dl, idx);
434 browser->searching_backwards = true; 431 browser->searching_backwards = true;
435 return true; 432 return true;
436} 433}
@@ -613,7 +610,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
613 void(*timer)(void *arg), void *arg, 610 void(*timer)(void *arg), void *arg,
614 int delay_secs) 611 int delay_secs)
615{ 612{
616 struct objdump_line *pos, *n; 613 struct disasm_line *pos, *n;
617 struct annotation *notes; 614 struct annotation *notes;
618 struct map_symbol ms = { 615 struct map_symbol ms = {
619 .map = map, 616 .map = map,
@@ -624,7 +621,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
624 .refresh = ui_browser__list_head_refresh, 621 .refresh = ui_browser__list_head_refresh,
625 .seek = ui_browser__list_head_seek, 622 .seek = ui_browser__list_head_seek,
626 .write = annotate_browser__write, 623 .write = annotate_browser__write,
627 .filter = objdump_line__filter, 624 .filter = disasm_line__filter,
628 .priv = &ms, 625 .priv = &ms,
629 .use_navkeypressed = true, 626 .use_navkeypressed = true,
630 }, 627 },
@@ -637,7 +634,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
637 if (map->dso->annotate_warned) 634 if (map->dso->annotate_warned)
638 return -1; 635 return -1;
639 636
640 if (symbol__annotate(sym, map, sizeof(struct objdump_line_rb_node)) < 0) { 637 if (symbol__annotate(sym, map, sizeof(struct disasm_line_rb_node)) < 0) {
641 ui__error("%s", ui_helpline__last_msg); 638 ui__error("%s", ui_helpline__last_msg);
642 return -1; 639 return -1;
643 } 640 }
@@ -648,12 +645,12 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
648 browser.start = map__rip_2objdump(map, sym->start); 645 browser.start = map__rip_2objdump(map, sym->start);
649 646
650 list_for_each_entry(pos, &notes->src->source, node) { 647 list_for_each_entry(pos, &notes->src->source, node) {
651 struct objdump_line_rb_node *rbpos; 648 struct disasm_line_rb_node *rbpos;
652 size_t line_len = strlen(pos->line); 649 size_t line_len = strlen(pos->line);
653 650
654 if (browser.b.width < line_len) 651 if (browser.b.width < line_len)
655 browser.b.width = line_len; 652 browser.b.width = line_len;
656 rbpos = objdump_line__rb(pos); 653 rbpos = disasm_line__rb(pos);
657 rbpos->idx = browser.nr_entries++; 654 rbpos->idx = browser.nr_entries++;
658 if (pos->offset != -1) 655 if (pos->offset != -1)
659 rbpos->idx_asm = browser.nr_asm_entries++; 656 rbpos->idx_asm = browser.nr_asm_entries++;
@@ -667,7 +664,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
667 ret = annotate_browser__run(&browser, evidx, timer, arg, delay_secs); 664 ret = annotate_browser__run(&browser, evidx, timer, arg, delay_secs);
668 list_for_each_entry_safe(pos, n, &notes->src->source, node) { 665 list_for_each_entry_safe(pos, n, &notes->src->source, node) {
669 list_del(&pos->node); 666 list_del(&pos->node);
670 objdump_line__free(pos); 667 disasm_line__free(pos);
671 } 668 }
672 return ret; 669 return ret;
673} 670}