perf auxtrace: Add mmap_needed to auxtrace_mmap_params
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 24 May 2022 07:54:23 +0000 (10:54 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 26 May 2022 15:36:56 +0000 (12:36 -0300)
commitd01508f2df21d6793f1642b20d4c1fe2f1c7fcba
treef64651c1c82526263f7e5d732fb61127111c6e8e
parent1097b38fb7583789ac5e33f3fefb1404bd087f99
perf auxtrace: Add mmap_needed to auxtrace_mmap_params

Add mmap_needed to auxtrace_mmap_params.

Currently an auxtrace mmap is always attempted even if the event is not an
auxtrace event. That works because, when AUX area tracing, there is always
an auxtrace event first for every mmap. Prepare for that not being the
case, which it won't be when sideband tracking events are allowed on
all CPUs even when auxtrace is limited to selected CPUs.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220524075436.29144-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/auxtrace.c
tools/perf/util/auxtrace.h
tools/perf/util/evlist.c
tools/perf/util/mmap.c