Re: [PATCH -v3] perf, x86: try to handle unknown nmis with running perfctrs

Don Zickus
2010-08-19T21:58:32Z

On Thu, Aug 19, 2010 at 04:27:13PM +0200, Peter Zijlstra wrote:
> x86_pmu.drain_pebs(regs);
> + }
>
> for_each_set_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) {
> struct perf_event *event = cpuc->events[bit];
>
> + handled++;
> +
> if (!test_bit(bit, cpuc->active_mask))
> continue;

Sorry I didn't notice this earlier, but I think you want that handled++
after the if(..) continue pieces. Otherwise you will always have a number
>1. :-)

Cheers,
Don