summaryrefslogtreecommitdiff
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-10-11 17:01:34 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-11-13 09:39:59 -0300
commitc4c724364d398a9746410d5ff482e8c4c7228249 (patch)
treeab2fbbf54cb1b6418f0afcfb6117ffb9bca81fde /tools/perf/ui/browsers/annotate.c
parentd03a686ea6e77b25edacc3eed386cef870e8d248 (diff)
perf annotate: Add annotation_line__next function
Rename disasm__get_next_ip_line() to annotation_line__next() to make it work over a generic struct annotation_line. 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/20171011150158.11895-12-jolsa@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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 3b72519c085f..881ad6122057 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -440,7 +440,8 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
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;
@@ -458,7 +459,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
continue;
}
- next = disasm__get_next_ip_line(&notes->src->source, pos);
+ next = annotation_line__next(&pos->al, &notes->src->source);
for (i = 0; i < browser->nr_events; i++) {
struct sym_hist_entry sample;
@@ -466,7 +467,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
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;