diff options
| author | Jiri Olsa <[email protected]> | 2019-10-07 12:53:17 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-10-10 14:43:49 +0000 |
| commit | 7728fa0cfaeb7d25b12c8865c733359cc8e5fb13 (patch) | |
| tree | 38b413ae51030cdc8006b3f000db7776915ea678 /tools/perf/util/python.c | |
| parent | perf tools: Use perf_mmap way to detect aux mmap (diff) | |
| download | kernel-7728fa0cfaeb7d25b12c8865c733359cc8e5fb13.tar.gz kernel-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 <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/python.c')
| -rw-r--r-- | tools/perf/util/python.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 02460362256d..82a4fa6c87bd 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -6,6 +6,7 @@ #include <linux/err.h> #include <perf/cpumap.h> #include <traceevent/event-parse.h> +#include <perf/mmap.h> #include "evlist.h" #include "callchain.h" #include "evsel.h" @@ -1045,7 +1046,7 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist, err = perf_evsel__parse_sample(evsel, event, &pevent->sample); /* Consume the even only after we parsed it out. */ - perf_mmap__consume(md); + perf_mmap__consume(&md->core); if (err) return PyErr_Format(PyExc_OSError, |
