提交 7df319e5 编写于 作者: A Adrian Hunter 提交者: Arnaldo Carvalho de Melo

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: NAdrian Hunter <adrian.hunter@intel.com>
Acked-by: NIan 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 8f111be6
...@@ -319,6 +319,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr, ...@@ -319,6 +319,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
} }
evsel->core.attr.freq = 0; evsel->core.attr.freq = 0;
evsel->core.attr.sample_period = 1; evsel->core.attr.sample_period = 1;
evsel->needs_auxtrace_mmap = true;
cs_etm_evsel = evsel; cs_etm_evsel = evsel;
opts->full_auxtrace = true; opts->full_auxtrace = true;
} }
......
...@@ -160,6 +160,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr, ...@@ -160,6 +160,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
} }
evsel->core.attr.freq = 0; evsel->core.attr.freq = 0;
evsel->core.attr.sample_period = arm_spe_pmu->default_config->sample_period; evsel->core.attr.sample_period = arm_spe_pmu->default_config->sample_period;
evsel->needs_auxtrace_mmap = true;
arm_spe_evsel = evsel; arm_spe_evsel = evsel;
opts->full_auxtrace = true; opts->full_auxtrace = true;
} }
......
...@@ -98,6 +98,7 @@ struct auxtrace_record *auxtrace_record__init(struct evlist *evlist, ...@@ -98,6 +98,7 @@ struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
evlist__for_each_entry(evlist, pos) { evlist__for_each_entry(evlist, pos) {
if (pos->core.attr.config == PERF_EVENT_CPUM_SF_DIAG) { if (pos->core.attr.config == PERF_EVENT_CPUM_SF_DIAG) {
diagnose = 1; diagnose = 1;
pos->needs_auxtrace_mmap = true;
break; break;
} }
} }
......
...@@ -129,6 +129,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr, ...@@ -129,6 +129,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
} }
evsel->core.attr.freq = 0; evsel->core.attr.freq = 0;
evsel->core.attr.sample_period = 1; evsel->core.attr.sample_period = 1;
evsel->needs_auxtrace_mmap = true;
intel_bts_evsel = evsel; intel_bts_evsel = evsel;
opts->full_auxtrace = true; opts->full_auxtrace = true;
} }
......
...@@ -649,6 +649,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr, ...@@ -649,6 +649,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
evsel->core.attr.freq = 0; evsel->core.attr.freq = 0;
evsel->core.attr.sample_period = 1; evsel->core.attr.sample_period = 1;
evsel->no_aux_samples = true; evsel->no_aux_samples = true;
evsel->needs_auxtrace_mmap = true;
intel_pt_evsel = evsel; intel_pt_evsel = evsel;
opts->full_auxtrace = true; opts->full_auxtrace = true;
} }
......
...@@ -130,6 +130,7 @@ struct evsel { ...@@ -130,6 +130,7 @@ struct evsel {
bool merged_stat; bool merged_stat;
bool reset_group; bool reset_group;
bool errored; bool errored;
bool needs_auxtrace_mmap;
struct hashmap *per_pkg_mask; struct hashmap *per_pkg_mask;
int err; int err;
struct { struct {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册