Commit 91a8c5b8 authored by Kan Liang's avatar Kan Liang Committed by Arnaldo Carvalho de Melo

perf intel-pt: Always set no branch for dummy event

An earlier kernel patch allowed enabling PT and LBR at the same time on
Goldmont.

commit ccbebba4 ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity
if the core supports it")

However, users still cannot use Intel PT and LBRs simultaneously.  $
sudo perf record -e cycles,intel_pt//u -b  -- sleep 1 Error: PMU
Hardware doesn't support sampling/overflow-interrupts.

PT implicitly adds dummy event in perf tool. dummy event is software
event which doesn't support LBR.

Always setting no branch for dummy event in Intel PT.
Signed-off-by: default avatarKan Liang <kan.liang@intel.com>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170630141656.1626-2-kan.liang@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 69d8bd8a
...@@ -701,6 +701,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr, ...@@ -701,6 +701,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
perf_evsel__set_sample_bit(switch_evsel, TID); perf_evsel__set_sample_bit(switch_evsel, TID);
perf_evsel__set_sample_bit(switch_evsel, TIME); perf_evsel__set_sample_bit(switch_evsel, TIME);
perf_evsel__set_sample_bit(switch_evsel, CPU); perf_evsel__set_sample_bit(switch_evsel, CPU);
perf_evsel__reset_sample_bit(switch_evsel, BRANCH_STACK);
opts->record_switch_events = false; opts->record_switch_events = false;
ptr->have_sched_switch = 3; ptr->have_sched_switch = 3;
...@@ -762,6 +763,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr, ...@@ -762,6 +763,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
/* And the CPU for switch events */ /* And the CPU for switch events */
perf_evsel__set_sample_bit(tracking_evsel, CPU); perf_evsel__set_sample_bit(tracking_evsel, CPU);
} }
perf_evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK);
} }
/* /*
......
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