summaryrefslogtreecommitdiff
path: root/tools/perf/util/mmap.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-10-07 15:53:17 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-10-10 17:43:49 +0300
commit7728fa0cfaeb7d25b12c8865c733359cc8e5fb13 (patch)
tree38b413ae51030cdc8006b3f000db7776915ea678 /tools/perf/util/mmap.h
parent1d40ae4e1784bfa1646fd153ca022db21511284f (diff)
downloadlinux-7728fa0cfaeb7d25b12c8865c733359cc8e5fb13.tar.xz
libperf: Adopt perf_mmap__consume() function from tools/perf
Move perf_mmap__consume() vrom tools/perf to libperf and export it in the perf/mmap.h header. Move also the needed helpers perf_mmap__write_tail(), perf_mmap__read_head() and perf_mmap__empty(). Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20191007125344.14268-10-jolsa@kernel.org 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.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
index 78e3c4436ce8..89fb93267ff1 100644
--- a/tools/perf/util/mmap.h
+++ b/tools/perf/util/mmap.h
@@ -45,18 +45,6 @@ struct mmap_params {
int mmap__mmap(struct mmap *map, struct mmap_params *mp, int fd, int cpu);
void mmap__munmap(struct mmap *map);
-void perf_mmap__consume(struct mmap *map);
-
-static inline u64 perf_mmap__read_head(struct mmap *mm)
-{
- return ring_buffer_read_head(mm->core.base);
-}
-
-static inline void perf_mmap__write_tail(struct mmap *md, u64 tail)
-{
- ring_buffer_write_tail(md->core.base, tail);
-}
-
union perf_event *perf_mmap__read_forward(struct mmap *map);
union perf_event *perf_mmap__read_event(struct mmap *map);