summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/mmap.h
diff options
context:
space:
mode:
authorKan Liang <kan.liang@intel.com>2018-01-18 13:26:19 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-02-15 09:52:22 -0300
commit8872481bd04850b19e053dc579de5a11b83b16fc (patch)
tree1ab57d0e91aca3240df33aa3c2ac528df68804f2 /tools/perf/util/mmap.h
parentf92c8cbe597a5a2ccec702dff824f3fe0f3623eb (diff)
downloadlinux-stable-8872481bd04850b19e053dc579de5a11b83b16fc.tar.gz
linux-stable-8872481bd04850b19e053dc579de5a11b83b16fc.tar.bz2
linux-stable-8872481bd04850b19e053dc579de5a11b83b16fc.zip
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>
Diffstat (limited to 'tools/perf/util/mmap.h')
-rw-r--r--tools/perf/util/mmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
index e43d7b55a55f..9ab2b48df65b 100644
--- a/tools/perf/util/mmap.h
+++ b/tools/perf/util/mmap.h
@@ -94,4 +94,6 @@ int perf_mmap__push(struct perf_mmap *md, bool backward,
size_t perf_mmap__mmap_len(struct perf_mmap *map);
+int perf_mmap__read_init(struct perf_mmap *md, bool overwrite,
+ u64 *startp, u64 *endp);
#endif /*__PERF_MMAP_H */