Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf auxtrace: Record whether an auxtrace mmap is needed

Add a flag needs_auxtrace_mmap to record whether an auxtrace mmap is
needed, in preparation for correctly determining whether or not an
auxtrace mmap is needed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20220506122601.367589-10-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
7df319e5 8f111be6

+6
+1
tools/perf/arch/arm/util/cs-etm.c
··· 319 319 } 320 320 evsel->core.attr.freq = 0; 321 321 evsel->core.attr.sample_period = 1; 322 + evsel->needs_auxtrace_mmap = true; 322 323 cs_etm_evsel = evsel; 323 324 opts->full_auxtrace = true; 324 325 }
+1
tools/perf/arch/arm64/util/arm-spe.c
··· 160 160 } 161 161 evsel->core.attr.freq = 0; 162 162 evsel->core.attr.sample_period = arm_spe_pmu->default_config->sample_period; 163 + evsel->needs_auxtrace_mmap = true; 163 164 arm_spe_evsel = evsel; 164 165 opts->full_auxtrace = true; 165 166 }
+1
tools/perf/arch/s390/util/auxtrace.c
··· 98 98 evlist__for_each_entry(evlist, pos) { 99 99 if (pos->core.attr.config == PERF_EVENT_CPUM_SF_DIAG) { 100 100 diagnose = 1; 101 + pos->needs_auxtrace_mmap = true; 101 102 break; 102 103 } 103 104 }
+1
tools/perf/arch/x86/util/intel-bts.c
··· 129 129 } 130 130 evsel->core.attr.freq = 0; 131 131 evsel->core.attr.sample_period = 1; 132 + evsel->needs_auxtrace_mmap = true; 132 133 intel_bts_evsel = evsel; 133 134 opts->full_auxtrace = true; 134 135 }
+1
tools/perf/arch/x86/util/intel-pt.c
··· 649 649 evsel->core.attr.freq = 0; 650 650 evsel->core.attr.sample_period = 1; 651 651 evsel->no_aux_samples = true; 652 + evsel->needs_auxtrace_mmap = true; 652 653 intel_pt_evsel = evsel; 653 654 opts->full_auxtrace = true; 654 655 }
+1
tools/perf/util/evsel.h
··· 130 130 bool merged_stat; 131 131 bool reset_group; 132 132 bool errored; 133 + bool needs_auxtrace_mmap; 133 134 struct hashmap *per_pkg_mask; 134 135 int err; 135 136 struct {