diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-10-07 14:53:17 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-10-10 16:43:49 +0200 |
commit | 7728fa0cfaeb7d25b12c8865c733359cc8e5fb13 (patch) | |
tree | 38b413ae51030cdc8006b3f000db7776915ea678 /tools/perf/tests/openat-syscall-tp-fields.c | |
parent | perf tools: Use perf_mmap way to detect aux mmap (diff) | |
download | linux-7728fa0cfaeb7d25b12c8865c733359cc8e5fb13.tar.xz linux-7728fa0cfaeb7d25b12c8865c733359cc8e5fb13.zip |
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/tests/openat-syscall-tp-fields.c')
-rw-r--r-- | tools/perf/tests/openat-syscall-tp-fields.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index 2b5c46813053..bbf8ba320721 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c @@ -13,6 +13,7 @@ #include "debug.h" #include "util/mmap.h" #include <errno.h> +#include <perf/mmap.h> #ifndef O_DIRECTORY #define O_DIRECTORY 00200000 @@ -103,7 +104,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest ++nr_events; if (type != PERF_RECORD_SAMPLE) { - perf_mmap__consume(md); + perf_mmap__consume(&md->core); continue; } |