Commit 7d189cad authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf intel-pt: Track sideband system-wide when needed

User space tasks can migrate between CPUs, so when tracing selected CPUs,
sideband for all CPUs is still needed. This is in preparation for allowing
system-wide events on all CPUs while the user requested events are on only
user requested CPUs.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Acked-by: default avatarIan Rogers <irogers@google.com>
Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220524075436.29144-9-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e665c82a
...@@ -864,20 +864,22 @@ static int intel_pt_recording_options(struct auxtrace_record *itr, ...@@ -864,20 +864,22 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
/* Add dummy event to keep tracking */ /* Add dummy event to keep tracking */
if (opts->full_auxtrace) { if (opts->full_auxtrace) {
bool need_system_wide_tracking;
struct evsel *tracking_evsel; struct evsel *tracking_evsel;
err = parse_events(evlist, "dummy:u", NULL); /*
if (err) * User space tasks can migrate between CPUs, so when tracing
return err; * selected CPUs, sideband for all CPUs is still needed.
*/
need_system_wide_tracking = evlist->core.has_user_cpus &&
!intel_pt_evsel->core.attr.exclude_user;
tracking_evsel = evlist__last(evlist); tracking_evsel = evlist__add_aux_dummy(evlist, need_system_wide_tracking);
if (!tracking_evsel)
return -ENOMEM;
evlist__set_tracking_event(evlist, tracking_evsel); evlist__set_tracking_event(evlist, tracking_evsel);
tracking_evsel->core.attr.freq = 0;
tracking_evsel->core.attr.sample_period = 1;
tracking_evsel->no_aux_samples = true;
if (need_immediate) if (need_immediate)
tracking_evsel->immediate = true; tracking_evsel->immediate = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment