Merge branch 'for-6.9/amd-sfh' into for-linus
[sfrench/cifs-2.6.git] / tools / perf / arch / x86 / util / intel-pt.c
index fa0c718b9e7277f0374356bf5d46b603f19ed7ca..d199619df3abe1b22c70fbfa1eea485eb095ae6f 100644 (file)
@@ -369,7 +369,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr,
                        ui__warning("Intel Processor Trace: TSC not available\n");
        }
 
-       per_cpu_mmaps = !perf_cpu_map__empty(session->evlist->core.user_requested_cpus);
+       per_cpu_mmaps = !perf_cpu_map__has_any_cpu_or_is_empty(session->evlist->core.user_requested_cpus);
 
        auxtrace_info->type = PERF_AUXTRACE_INTEL_PT;
        auxtrace_info->priv[INTEL_PT_PMU_TYPE] = intel_pt_pmu->type;
@@ -774,7 +774,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
         * Per-cpu recording needs sched_switch events to distinguish different
         * threads.
         */
-       if (have_timing_info && !perf_cpu_map__empty(cpus) &&
+       if (have_timing_info && !perf_cpu_map__has_any_cpu_or_is_empty(cpus) &&
            !record_opts__no_switch_events(opts)) {
                if (perf_can_record_switch_events()) {
                        bool cpu_wide = !target__none(&opts->target) &&
@@ -832,7 +832,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
                 * In the case of per-cpu mmaps, we need the CPU on the
                 * AUX event.
                 */
-               if (!perf_cpu_map__empty(cpus))
+               if (!perf_cpu_map__has_any_cpu_or_is_empty(cpus))
                        evsel__set_sample_bit(intel_pt_evsel, CPU);
        }
 
@@ -858,7 +858,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
                        tracking_evsel->immediate = true;
 
                /* In per-cpu case, always need the time of mmap events etc */
-               if (!perf_cpu_map__empty(cpus)) {
+               if (!perf_cpu_map__has_any_cpu_or_is_empty(cpus)) {
                        evsel__set_sample_bit(tracking_evsel, TIME);
                        /* And the CPU for switch events */
                        evsel__set_sample_bit(tracking_evsel, CPU);
@@ -870,7 +870,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
         * Warn the user when we do not have enough information to decode i.e.
         * per-cpu with no sched_switch (except workload-only).
         */
-       if (!ptr->have_sched_switch && !perf_cpu_map__empty(cpus) &&
+       if (!ptr->have_sched_switch && !perf_cpu_map__has_any_cpu_or_is_empty(cpus) &&
            !target__none(&opts->target) &&
            !intel_pt_evsel->core.attr.exclude_user)
                ui__warning("Intel Processor Trace decoding will not be possible except for kernel tracing!\n");