diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2019-08-23 15:58:58 +0300 |
---|---|---|
committer | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2019-10-25 15:58:07 +0300 |
commit | e74a2b56f77a45613ebbed385440b710a080fb2e (patch) | |
tree | 5138a2aaafeeb53710dc82dc70772b45bb1a3f4b | |
parent | e13fe96a865a0e4238e73e32bb5b432f263cfe97 (diff) | |
download | linux-perf-aux-sampling.tar.gz |
perf intel-bts: Does not support AUX area samplingperf-aux-sampling
Add an error message because Intel BTS does not support AUX area
sampling.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
-rw-r--r-- | tools/perf/arch/x86/util/auxtrace.c | 2 | ||||
-rw-r--r-- | tools/perf/arch/x86/util/intel-bts.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/util/auxtrace.c b/tools/perf/arch/x86/util/auxtrace.c index 092543cad3245..7abc9fd4cbec4 100644 --- a/tools/perf/arch/x86/util/auxtrace.c +++ b/tools/perf/arch/x86/util/auxtrace.c @@ -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) diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c index f7f68a50a5cd5..27d9e214d0680 100644 --- a/tools/perf/arch/x86/util/intel-bts.c +++ b/tools/perf/arch/x86/util/intel-bts.c @@ -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; |