From 1fcbb75cc574072ab457dbbaa74fc7064b691e86 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Mon, 7 Oct 2019 14:53:23 +0200 Subject: libperf: Introduce perf_evlist_mmap_ops::idx callback Add the perf_evlist_mmap_ops::idx callback to be called in mmap_per_cpu() and mmap_per_thread() with current cpu and thread indexes. It's used by current aux code, so perf will use this callback to set the aux index. 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-16-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/lib/include/internal/evlist.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/perf/lib/include') diff --git a/tools/perf/lib/include/internal/evlist.h b/tools/perf/lib/include/internal/evlist.h index e5f092ff6202..053f620696f3 100644 --- a/tools/perf/lib/include/internal/evlist.h +++ b/tools/perf/lib/include/internal/evlist.h @@ -27,7 +27,11 @@ struct perf_evlist { struct perf_mmap *mmap_ovw; }; +typedef void +(*perf_evlist_mmap__cb_idx_t)(struct perf_evlist*, struct perf_mmap_param*, int, bool); + struct perf_evlist_mmap_ops { + perf_evlist_mmap__cb_idx_t idx; }; int perf_evlist__alloc_pollfd(struct perf_evlist *evlist); -- cgit v1.2.3