[v2,04/20] perf/hw_breakpoint: perf/core: advertise PMU exclusion capability
diff mbox series

Message ID 1543230756-15319-5-git-send-email-andrew.murray@arm.com
State Not Applicable
Headers show
Series
  • perf/core: Generalise event exclusion checking
Related show

Checks

Context Check Description
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
snowpatch_ozlabs/apply_patch success next/apply_patch Successfully applied

Commit Message

Andrew Murray Nov. 26, 2018, 11:12 a.m. UTC
The breakpoint PMU has the capability to exclude kernel contexts,
let's advertise that we support the PERF_PMU_CAP_EXCLUDE
capability so that perf doesn't prevent us from handling events
with any exclusion flags set.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
---
 kernel/events/hw_breakpoint.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index d6b5618..fefe3d5 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -669,6 +669,8 @@  static struct pmu perf_breakpoint = {
 	.start		= hw_breakpoint_start,
 	.stop		= hw_breakpoint_stop,
 	.read		= hw_breakpoint_pmu_read,
+
+	.capabilities	= PERF_PMU_CAP_EXCLUDE,
 };
 
 int __init init_hw_breakpoint(void)