container_of(itr, struct arm_spe_recording, itr);
struct perf_pmu *arm_spe_pmu = sper->arm_spe_pmu;
struct evsel *evsel, *arm_spe_evsel = NULL;
+ struct perf_cpu_map *cpus = evlist->core.cpus;
bool privileged = perf_event_paranoid_check(-1);
struct evsel *tracking_evsel;
int err;
*/
evlist__to_front(evlist, arm_spe_evsel);
- evsel__set_sample_bit(arm_spe_evsel, CPU);
- evsel__set_sample_bit(arm_spe_evsel, TIME);
- evsel__set_sample_bit(arm_spe_evsel, TID);
+ /* In the case of per-cpu mmaps, sample CPU for AUX event. */
+ if (!perf_cpu_map__empty(cpus))
+ evsel__set_sample_bit(arm_spe_evsel, CPU);
/* Add dummy event to keep tracking */
err = parse_events(evlist, "dummy:u", NULL);