Messages in this thread | | | Date | Sat, 13 Jun 2009 14:37:16 +1000 | From | Paul Mackerras <> | Subject | Re: [PATCH] scripts/checksyscalls.sh: only whine perf_counter_open when supported |
| |
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.
| |