diff options
Diffstat (limited to 'tools/perf/util/ui/browsers/annotate.c')
-rw-r--r-- | tools/perf/util/ui/browsers/annotate.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c index daa7138d801..8d8a16895af 100644 --- a/tools/perf/util/ui/browsers/annotate.c +++ b/tools/perf/util/ui/browsers/annotate.c | |||
@@ -61,7 +61,7 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro | |||
61 | 61 | ||
62 | static double objdump_line__calc_percent(struct objdump_line *self, | 62 | static double objdump_line__calc_percent(struct objdump_line *self, |
63 | struct list_head *head, | 63 | struct list_head *head, |
64 | struct symbol *sym) | 64 | struct symbol *sym, int evidx) |
65 | { | 65 | { |
66 | double percent = 0.0; | 66 | double percent = 0.0; |
67 | 67 | ||
@@ -70,7 +70,7 @@ static double objdump_line__calc_percent(struct objdump_line *self, | |||
70 | unsigned int hits = 0; | 70 | unsigned int hits = 0; |
71 | struct annotation *notes = symbol__annotation(sym); | 71 | struct annotation *notes = symbol__annotation(sym); |
72 | struct source_line *src_line = notes->src_line; | 72 | struct source_line *src_line = notes->src_line; |
73 | struct sym_hist *h = notes->histogram; | 73 | struct sym_hist *h = annotation__histogram(notes, evidx); |
74 | s64 offset = self->offset; | 74 | s64 offset = self->offset; |
75 | struct objdump_line *next = objdump__get_next_ip_line(head, self); | 75 | struct objdump_line *next = objdump__get_next_ip_line(head, self); |
76 | 76 | ||
@@ -183,12 +183,12 @@ out: | |||
183 | return key; | 183 | return key; |
184 | } | 184 | } |
185 | 185 | ||
186 | int hist_entry__tui_annotate(struct hist_entry *he) | 186 | int hist_entry__tui_annotate(struct hist_entry *he, int evidx) |
187 | { | 187 | { |
188 | return symbol__tui_annotate(he->ms.sym, he->ms.map); | 188 | return symbol__tui_annotate(he->ms.sym, he->ms.map, evidx); |
189 | } | 189 | } |
190 | 190 | ||
191 | int symbol__tui_annotate(struct symbol *sym, struct map *map) | 191 | int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx) |
192 | { | 192 | { |
193 | struct objdump_line *pos, *n; | 193 | struct objdump_line *pos, *n; |
194 | struct objdump_line_rb_node *rbpos; | 194 | struct objdump_line_rb_node *rbpos; |
@@ -223,7 +223,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map) | |||
223 | browser.b.width = line_len; | 223 | browser.b.width = line_len; |
224 | rbpos = objdump_line__rb(pos); | 224 | rbpos = objdump_line__rb(pos); |
225 | rbpos->idx = browser.b.nr_entries++; | 225 | rbpos->idx = browser.b.nr_entries++; |
226 | rbpos->percent = objdump_line__calc_percent(pos, &head, sym); | 226 | rbpos->percent = objdump_line__calc_percent(pos, &head, sym, evidx); |
227 | if (rbpos->percent < 0.01) | 227 | if (rbpos->percent < 0.01) |
228 | continue; | 228 | continue; |
229 | objdump__insert_line(&browser.entries, rbpos); | 229 | objdump__insert_line(&browser.entries, rbpos); |