Re: [PATCH] scripts/checksyscalls.sh: only whine perf_counter_openwhen supported
From: Paul Mackerras
Date: Sat Jun 13 2009 - 01:33:38 EST
Ingo Molnar writes:
> PMU support is not required to get perfcounters support: if an
> architecture hooks up the syscall it will get generic software
> counters and the tools will work as well.
It looks to me that to work properly, each architecture has to provide
set_perf_counter_pending() and some way to arrange to call
perf_counter_do_pending() once interrupts get re-enabled. We need
this because some software counters (the context-switch counter at
least, as well as all the tracepoint counters) use nmi = 1 because
their events happen at times when we can't do a wakeup.
Actually, as far as the tracepoints are concerned, I can't see any
reason to be sure that interrupts will be disabled when a tracepoint
event occurs. On powerpc, calling set_perf_counter_pending() when
interrupts are enabled won't result in perf_counter_do_pending()
getting called right away; the perf_counter_do_pending() call won't
happen until something disables and re-enables interrupts.
Paul.
--
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/