libperf: Adopt perf_mmap__consume() function from tools/perf
authorJiri Olsa <jolsa@kernel.org>
Mon, 7 Oct 2019 12:53:17 +0000 (14:53 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 10 Oct 2019 14:43:49 +0000 (11:43 -0300)
commit7728fa0cfaeb7d25b12c8865c733359cc8e5fb13
tree38b413ae51030cdc8006b3f000db7776915ea678
parent1d40ae4e1784bfa1646fd153ca022db21511284f
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>
23 files changed:
tools/perf/arch/x86/tests/perf-time-to-tsc.c
tools/perf/builtin-kvm.c
tools/perf/builtin-top.c
tools/perf/builtin-trace.c
tools/perf/lib/Makefile
tools/perf/lib/include/internal/mmap.h
tools/perf/lib/include/perf/mmap.h [new file with mode: 0644]
tools/perf/lib/libperf.map
tools/perf/lib/mmap.c
tools/perf/tests/backward-ring-buffer.c
tools/perf/tests/bpf.c
tools/perf/tests/code-reading.c
tools/perf/tests/keep-tracking.c
tools/perf/tests/mmap-basic.c
tools/perf/tests/openat-syscall-tp-fields.c
tools/perf/tests/perf-record.c
tools/perf/tests/sw-clock.c
tools/perf/tests/switch-tracking.c
tools/perf/tests/task-exit.c
tools/perf/util/evlist.c
tools/perf/util/mmap.c
tools/perf/util/mmap.h
tools/perf/util/python.c