From 3a8bb58121987a8405d6f96cd8815025e564605d Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Mon, 7 Oct 2019 14:53:24 +0200 Subject: libperf: Add perf_evlist_mmap_ops::get callback Add the perf_evlist_mmap_ops::get callback to be called in mmap_per_evsel() to get/allocate the 'struct perf_mmap' object. Add the libperf's perf_evlist__mmap_cb_get() function as libperf's get callback. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/lib/include/internal/evlist.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/perf/lib/include/internal/evlist.h') diff --git a/tools/perf/lib/include/internal/evlist.h b/tools/perf/lib/include/internal/evlist.h index 053f620696f3..9bc3a21643ea 100644 --- a/tools/perf/lib/include/internal/evlist.h +++ b/tools/perf/lib/include/internal/evlist.h @@ -29,9 +29,12 @@ struct perf_evlist { typedef void (*perf_evlist_mmap__cb_idx_t)(struct perf_evlist*, struct perf_mmap_param*, int, bool); +typedef struct perf_mmap* +(*perf_evlist_mmap__cb_get_t)(struct perf_evlist*, bool, int); struct perf_evlist_mmap_ops { perf_evlist_mmap__cb_idx_t idx; + perf_evlist_mmap__cb_get_t get; }; int perf_evlist__alloc_pollfd(struct perf_evlist *evlist); -- cgit v1.2.3-59-g8ed1b