Skip to content

Commit 91a8c5b

Browse files
kliang2acmel
authored andcommitted
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 ccbebba ("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: Kan Liang <kan.liang@intel.com> Acked-by: Jiri 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.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 69d8bd8 commit 91a8c5b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/perf/arch/x86/util/intel-pt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
701701
perf_evsel__set_sample_bit(switch_evsel, TID);
702702
perf_evsel__set_sample_bit(switch_evsel, TIME);
703703
perf_evsel__set_sample_bit(switch_evsel, CPU);
704+
perf_evsel__reset_sample_bit(switch_evsel, BRANCH_STACK);
704705

705706
opts->record_switch_events = false;
706707
ptr->have_sched_switch = 3;
@@ -762,6 +763,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
762763
/* And the CPU for switch events */
763764
perf_evsel__set_sample_bit(tracking_evsel, CPU);
764765
}
766+
perf_evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK);
765767
}
766768

767769
/*

0 commit comments

Comments
 (0)