perf intel-bts: Does not support AUX area sampling
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 15 Nov 2019 12:42:25 +0000 (14:42 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 22 Nov 2019 13:48:13 +0000 (10:48 -0300)
Add an error message because Intel BTS does not support AUX area
sampling.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20191115124225.5247-16-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/auxtrace.c
tools/perf/arch/x86/util/intel-bts.c

index 092543c..7abc9fd 100644 (file)
@@ -29,6 +29,8 @@ struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
        if (intel_pt_pmu)
                intel_pt_pmu->auxtrace = true;
        intel_bts_pmu = perf_pmu__find(INTEL_BTS_PMU_NAME);
+       if (intel_bts_pmu)
+               intel_bts_pmu->auxtrace = true;
 
        evlist__for_each_entry(evlist, evsel) {
                if (intel_pt_pmu && evsel->core.attr.type == intel_pt_pmu->type)
index f7f68a5..27d9e21 100644 (file)
@@ -113,6 +113,11 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
        const struct perf_cpu_map *cpus = evlist->core.cpus;
        bool privileged = perf_event_paranoid_check(-1);
 
+       if (opts->auxtrace_sample_mode) {
+               pr_err("Intel BTS does not support AUX area sampling\n");
+               return -EINVAL;
+       }
+
        btsr->evlist = evlist;
        btsr->snapshot_mode = opts->auxtrace_snapshot_mode;