Andi,
On Wed, Nov 14, 2007 at 01:38:38PM +0100, Andi Kleen wrote:
This only works when counting (not sampling) and only for self-monitoring.
On a machine with only two generic counters such as MIPS or Intel Core 2 Duo,
multiplexing offers some advantages. If NMI watchdog is enabled, then you drop
to one generic counter on on Core 2.
As I said earlier, we do use read(), not for reading counters but to extract overflow
notification messages when we are sampling. It makes more sense for this usage because
this is where you want to leverage some key mechanisms such as:
- asynchronous notification via SIGIO. this is how you can implement self-sampling
for instance.
- select/poll to allow monitoring tools to wait for notification coming from
multiple sessions in one call. This is useful when monitoring across fork or
pthread_create.
--
-Stephane
-