OSDN Git Service

libperf: Adopt perf_evlist__mmap()/munmap() from tools/perf
authorJiri Olsa <jolsa@kernel.org>
Mon, 7 Oct 2019 12:53:21 +0000 (14:53 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 10 Oct 2019 15:15:58 +0000 (12:15 -0300)
commitd1a177595b3a824c72dacb0f9d1a4e5906eaef0e
treebc1e23a5dbb635b70bfa57cd7bc8af91d2f9914d
parent151ed5d70da87720022e4171227733a008b3c719
libperf: Adopt perf_evlist__mmap()/munmap() from tools/perf

Add libperf's version of perf_evlist__mmap()/munmap() functions and
exporting them in the perf/evlist.h header.

It's the backbone of what we have in perf code. The following changes
will add needed callbacks and then we'll finally switch the perf code to
use libperf's version.

Add mmap/mmap_ovw 'struct perf_mmap' object arrays to hold maps for
libperf's evlist.

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-14-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/lib/evlist.c
tools/perf/lib/include/internal/evlist.h
tools/perf/lib/include/perf/evlist.h
tools/perf/lib/libperf.map