aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/lib/include/internal/evlist.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-10-07 14:53:24 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-10-10 12:21:11 -0300
commit3a8bb58121987a8405d6f96cd8815025e564605d (patch)
treeedced8d0ff9b881bfe569d7bbdd9b2d472520c86 /tools/perf/lib/include/internal/evlist.h
parentlibperf: Introduce perf_evlist_mmap_ops::idx callback (diff)
downloadlinux-dev-3a8bb58121987a8405d6f96cd8815025e564605d.tar.xz
linux-dev-3a8bb58121987a8405d6f96cd8815025e564605d.zip
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 <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-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/lib/include/internal/evlist.h3
1 files changed, 3 insertions, 0 deletions
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);