Re: perf_counters issue with self-sampling threads

From: Peter Zijlstra
Date: Mon Jul 27 2009 - 12:54:24 EST


On Mon, 2009-07-27 at 18:51 +0200, stephane eranian wrote:
> Hi,
>
> I believe there is a problem with the current perf_counters (PCL)
> code for self-sampling threads. The problem is related to sample
> notifications via signal.
>
> PCL (just like perfmon) is using SIGIO, an asynchronous signal,
> to notify user applications of the availability of data in the event
> buffer.
>
> POSIX does not mandate that asynchronous signals be delivered
> to the thread in which they originated. Any thread in the process
> may process the signal, assuming it does not have the signal
> blocked.

Bugger, you're right. /me kicks POSIX again for creating these crazy ass
semantics.

I'll look at fixing this.

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/