aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2012-02-09 17:20:59 -0500
committerIngo Molnar <mingo@elte.hu>2012-03-05 08:55:42 -0500
commit2481c5fa6db0237e4f0168f88913178b2b495b7c (patch)
tree4d0e8e9616c8e83ca2a72abbc3ac94621adc49be /arch/sparc/kernel
parent3e702ff6d1ea12dcf1c798ecb61e7f3a1579df42 (diff)
perf: Disable PERF_SAMPLE_BRANCH_* when not supported
PERF_SAMPLE_BRANCH_* is disabled for: - SW events (sw counters, tracepoints) - HW breakpoints - ALL but Intel x86 architecture - AMD64 processors Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1328826068-11713-10-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/perf_event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 614da624330c..8e16a4a21582 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1105,6 +1105,10 @@ static int sparc_pmu_event_init(struct perf_event *event)
1105 if (atomic_read(&nmi_active) < 0) 1105 if (atomic_read(&nmi_active) < 0)
1106 return -ENODEV; 1106 return -ENODEV;
1107 1107
1108 /* does not support taken branch sampling */
1109 if (has_branch_stack(event))
1110 return -EOPNOTSUPP;
1111
1108 switch (attr->type) { 1112 switch (attr->type) {
1109 case PERF_TYPE_HARDWARE: 1113 case PERF_TYPE_HARDWARE:
1110 if (attr->config >= sparc_pmu->max_events) 1114 if (attr->config >= sparc_pmu->max_events)