Merge branch 'perf/urgent' into perf/core
Conflicts: tools/perf/util/ui/browsers/hists.c Merge reason: fix the conflict and merge in changes for dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -102,6 +102,7 @@ struct cpu_hw_events {
|
||||
*/
|
||||
struct perf_event *events[X86_PMC_IDX_MAX]; /* in counter order */
|
||||
unsigned long active_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
|
||||
unsigned long running[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
|
||||
int enabled;
|
||||
|
||||
int n_events;
|
||||
@@ -1034,6 +1035,7 @@ static void x86_pmu_start(struct perf_event *event, int flags)
|
||||
|
||||
cpuc->events[idx] = event;
|
||||
__set_bit(idx, cpuc->active_mask);
|
||||
__set_bit(idx, cpuc->running);
|
||||
x86_pmu.enable(event);
|
||||
perf_event_update_userpage(event);
|
||||
}
|
||||
@@ -1159,8 +1161,16 @@ static int x86_pmu_handle_irq(struct pt_regs *regs)
|
||||
cpuc = &__get_cpu_var(cpu_hw_events);
|
||||
|
||||
for (idx = 0; idx < x86_pmu.num_counters; idx++) {
|
||||
if (!test_bit(idx, cpuc->active_mask))
|
||||
if (!test_bit(idx, cpuc->active_mask)) {
|
||||
/*
|
||||
* Though we deactivated the counter some cpus
|
||||
* might still deliver spurious interrupts still
|
||||
* in flight. Catch them:
|
||||
*/
|
||||
if (__test_and_clear_bit(idx, cpuc->running))
|
||||
handled++;
|
||||
continue;
|
||||
}
|
||||
|
||||
event = cpuc->events[idx];
|
||||
hwc = &event->hw;
|
||||
|
Reference in New Issue
Block a user