lkml.org 
[lkml]   [2017]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 01/10] perf/x86: Add warning on proper cpu during event's update
Date
Mark reported that we could actually call pmu->read on
unscheduled event. I think it's good idea to keep a
warning here to see if we've get it wrong again in
future.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
arch/x86/events/core.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index af12e294caed..b8e394d9f7f2 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -72,6 +72,8 @@ u64 x86_perf_event_update(struct perf_event *event)
int idx = hwc->idx;
u64 delta;

+ WARN_ON_ONCE(event->oncpu != smp_processor_id());
+
if (idx == INTEL_PMC_IDX_FIXED_BTS)
return 0;

--
2.9.5
\
 
 \ /
  Last update: 2017-08-24 18:31    [W:0.252 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site