perf annotate: Add symbol__calc_percent function
authorJiri Olsa <jolsa@kernel.org>
Wed, 11 Oct 2017 15:01:40 +0000 (17:01 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 16 Nov 2017 17:37:49 +0000 (14:37 -0300)
commit073ae601edc211383b62618effaaedaa8b1d22db
tree2a4187da8332b9fb549bf5b927a3f7ddd6f286b6
parent7e304557ead5b309d59807b2f05ed47f2c0076c6
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>
tools/perf/util/annotate.c
tools/perf/util/annotate.h