aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event_intel.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-06-17 20:36:49 -0400
committerIngo Molnar <mingo@kernel.org>2013-06-19 08:43:33 -0400
commit3044318f1f3a2a0a636b4c751ddb7169cb1b11b2 (patch)
tree704f1421c4862e7182764ddb668a7eba6d89146c /arch/x86/kernel/cpu/perf_event_intel.c
parent3a632cb229bfb18b6d09822cc842451ea46c013e (diff)
perf/x86/intel: Add Haswell PEBS support
Add simple PEBS support for Haswell. The constraints are similar to SandyBridge with a few new events. Reviewed-by: Stephane Eranian <eranian@google.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Andi Kleen <ak@linux.jf.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Link: http://lkml.kernel.org/r/1371515812-9646-4-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_intel.c')
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 4e995af0d384..4a4c4ba0c1d7 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -889,7 +889,8 @@ static inline bool intel_pmu_needs_lbr_smpl(struct perf_event *event)
889 return true; 889 return true;
890 890
891 /* implicit branch sampling to correct PEBS skid */ 891 /* implicit branch sampling to correct PEBS skid */
892 if (x86_pmu.intel_cap.pebs_trap && event->attr.precise_ip > 1) 892 if (x86_pmu.intel_cap.pebs_trap && event->attr.precise_ip > 1 &&
893 x86_pmu.intel_cap.pebs_format < 2)
893 return true; 894 return true;
894 895
895 return false; 896 return false;
@@ -2265,8 +2266,9 @@ __init int intel_pmu_init(void)
2265 intel_pmu_lbr_init_snb(); 2266 intel_pmu_lbr_init_snb();
2266 2267
2267 x86_pmu.event_constraints = intel_hsw_event_constraints; 2268 x86_pmu.event_constraints = intel_hsw_event_constraints;
2268 2269 x86_pmu.pebs_constraints = intel_hsw_pebs_event_constraints;
2269 x86_pmu.extra_regs = intel_snb_extra_regs; 2270 x86_pmu.extra_regs = intel_snb_extra_regs;
2271 x86_pmu.pebs_aliases = intel_pebs_aliases_snb;
2270 /* all extra regs are per-cpu when HT is on */ 2272 /* all extra regs are per-cpu when HT is on */
2271 x86_pmu.er_flags |= ERF_HAS_RSP_1; 2273 x86_pmu.er_flags |= ERF_HAS_RSP_1;
2272 x86_pmu.er_flags |= ERF_NO_HT_SHARING; 2274 x86_pmu.er_flags |= ERF_NO_HT_SHARING;