Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf, x86: Catch spurious interrupts after disabling counters
tracing/x86: Don't use mcount in kvmclock.c
tracing/x86: Don't use mcount in pvclock.c

+13 -1
+2
arch/x86/kernel/Makefile
··· 11 11 CFLAGS_REMOVE_tsc.o = -pg 12 12 CFLAGS_REMOVE_rtc.o = -pg 13 13 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg 14 + CFLAGS_REMOVE_pvclock.o = -pg 15 + CFLAGS_REMOVE_kvmclock.o = -pg 14 16 CFLAGS_REMOVE_ftrace.o = -pg 15 17 CFLAGS_REMOVE_early_printk.o = -pg 16 18 endif
+11 -1
arch/x86/kernel/cpu/perf_event.c
··· 102 102 */ 103 103 struct perf_event *events[X86_PMC_IDX_MAX]; /* in counter order */ 104 104 unsigned long active_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; 105 + unsigned long running[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; 105 106 int enabled; 106 107 107 108 int n_events; ··· 1011 1010 x86_perf_event_set_period(event); 1012 1011 cpuc->events[idx] = event; 1013 1012 __set_bit(idx, cpuc->active_mask); 1013 + __set_bit(idx, cpuc->running); 1014 1014 x86_pmu.enable(event); 1015 1015 perf_event_update_userpage(event); 1016 1016 ··· 1143 1141 cpuc = &__get_cpu_var(cpu_hw_events); 1144 1142 1145 1143 for (idx = 0; idx < x86_pmu.num_counters; idx++) { 1146 - if (!test_bit(idx, cpuc->active_mask)) 1144 + if (!test_bit(idx, cpuc->active_mask)) { 1145 + /* 1146 + * Though we deactivated the counter some cpus 1147 + * might still deliver spurious interrupts still 1148 + * in flight. Catch them: 1149 + */ 1150 + if (__test_and_clear_bit(idx, cpuc->running)) 1151 + handled++; 1147 1152 continue; 1153 + } 1148 1154 1149 1155 event = cpuc->events[idx]; 1150 1156 hwc = &event->hw;