perf mmap: Introduce perf_mmap__read_init()
authorKan Liang <kan.liang@intel.com>
Thu, 18 Jan 2018 21:26:19 +0000 (13:26 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 15 Feb 2018 12:52:22 +0000 (09:52 -0300)
commit8872481bd04850b19e053dc579de5a11b83b16fc
tree1ab57d0e91aca3240df33aa3c2ac528df68804f2
parentf92c8cbe597a5a2ccec702dff824f3fe0f3623eb
perf mmap: Introduce perf_mmap__read_init()

The new function perf_mmap__read_init() is factored out from
perf_mmap__push().

It is to calculate the 'start' and 'end' of the available data in
ringbuffer.

No functional change.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1516310792-208685-5-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/mmap.c
tools/perf/util/mmap.h