aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-10-11 17:01:40 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-11-16 14:37:49 -0300
commit073ae601edc211383b62618effaaedaa8b1d22db (patch)
tree2a4187da8332b9fb549bf5b927a3f7ddd6f286b6 /tools/perf/util/annotate.h
parentperf annotate: Add samples into struct annotation_line (diff)
downloadlinux-dev-073ae601edc211383b62618effaaedaa8b1d22db.tar.xz
linux-dev-073ae601edc211383b62618effaaedaa8b1d22db.zip
perf annotate: Add symbol__calc_percent function
Add symbol__calc_percent function, that calculates annotation data for symbol and put the data in the struct annotation_line::samples array. Committer notes: Made symbol__calc_percent non static to be used in the next two patches, which will get some fixups from jolsa, doing it this way to keep this bisectable. 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-18-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r--tools/perf/util/annotate.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index 55bdd9015f33..6056840da4c9 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -107,6 +107,7 @@ int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool r
size_t disasm__fprintf(struct list_head *head, FILE *fp);
double disasm__calc_percent(struct annotation *notes, int evidx, s64 offset,
s64 end, const char **path, struct sym_hist_entry *sample);
+int symbol__calc_percent(struct symbol *sym, struct perf_evsel *evsel);
struct sym_hist {
u64 nr_samples;