aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-10-11 11:01:34 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-11-13 07:39:59 -0500
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,
440 struct map_symbol *ms = browser->b.priv; 440 struct map_symbol *ms = browser->b.priv;
441 struct symbol *sym = ms->sym; 441 struct symbol *sym = ms->sym;
442 struct annotation *notes = symbol__annotation(sym); 442 struct annotation *notes = symbol__annotation(sym);
443 struct disasm_line *pos, *next; 443 struct annotation_line *next;
444 struct disasm_line *pos;
444 s64 len = symbol__size(sym); 445 s64 len = symbol__size(sym);
445 446
446 browser->entries = RB_ROOT; 447 browser->entries = RB_ROOT;
@@ -458,7 +459,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
458 continue; 459 continue;
459 } 460 }
460 461
461 next = disasm__get_next_ip_line(&notes->src->source, pos); 462 next = annotation_line__next(&pos->al, &notes->src->source);
462 463
463 for (i = 0; i < browser->nr_events; i++) { 464 for (i = 0; i < browser->nr_events; i++) {
464 struct sym_hist_entry sample; 465 struct sym_hist_entry sample;
@@ -466,7 +467,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
466 bpos->samples[i].percent = disasm__calc_percent(notes, 467 bpos->samples[i].percent = disasm__calc_percent(notes,
467 evsel->idx + i, 468 evsel->idx + i,
468 pos->al.offset, 469 pos->al.offset,
469 next ? next->al.offset : len, 470 next ? next->offset : len,
470 &path, &sample); 471 &path, &sample);
471 bpos->samples[i].he = sample; 472 bpos->samples[i].he = sample;
472 473