struct map_symbol *ms = browser->b.priv;
struct symbol *sym = ms->sym;
struct annotation *notes = symbol__annotation(sym);
- struct disasm_line *pos, *next;
+ struct annotation_line *next;
+ struct disasm_line *pos;
s64 len = symbol__size(sym);
browser->entries = RB_ROOT;
continue;
}
- next = disasm__get_next_ip_line(¬es->src->source, pos);
+ next = annotation_line__next(&pos->al, ¬es->src->source);
for (i = 0; i < browser->nr_events; i++) {
struct sym_hist_entry sample;
bpos->samples[i].percent = disasm__calc_percent(notes,
evsel->idx + i,
pos->al.offset,
- next ? next->al.offset : len,
+ next ? next->offset : len,
&path, &sample);
bpos->samples[i].he = sample;
list_add_tail(&line->al.node, head);
}
-struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disasm_line *pos)
+struct annotation_line *
+annotation_line__next(struct annotation_line *pos, struct list_head *head)
{
- list_for_each_entry_continue(pos, head, al.node)
- if (pos->al.offset >= 0)
+ list_for_each_entry_continue(pos, head, node)
+ if (pos->offset >= 0)
return pos;
return NULL;
struct annotation *notes = symbol__annotation(sym);
s64 offset = dl->al.offset;
const u64 addr = start + offset;
- struct disasm_line *next;
+ struct annotation_line *next;
struct block_range *br;
- next = disasm__get_next_ip_line(¬es->src->source, dl);
+ next = annotation_line__next(&dl->al, ¬es->src->source);
if (perf_evsel__is_group_event(evsel)) {
nr_percent = evsel->nr_members;
percent = disasm__calc_percent(notes,
notes->src->lines ? i : evsel->idx + i,
offset,
- next ? next->al.offset : (s64) len,
+ next ? next->offset : (s64) len,
&path, &sample);
ppercents[i] = percent;
};
void disasm_line__free(struct disasm_line *dl);
-struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disasm_line *pos);
+struct annotation_line *
+annotation_line__next(struct annotation_line *pos, struct list_head *head);
int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw);
size_t disasm__fprintf(struct list_head *head, FILE *fp);
double disasm__calc_percent(struct annotation *notes, int evidx, s64 offset,