Re: register_timer_hook use in arch/sh/oprofile

Ingo Molnar
2009-06-24T12:45:58Z

* Paul Mundt <lethal@linux-sh.org> wrote:

> My current plan is to migrate things over to the perf_counter API
> and annoy Ingo with my interrupt deprived counters ;-)

Please do :-)

I just wrote a longer explanation about them: i think they can be
made full-blown hardware counters, which in the end would be
basically just as capable as 'real' IRQ capable counters.

The main complication that such counters bring is that in their 'own
metric' they do interrupt periods in an 'irregular' way (because
they interrupt in the nanosec metric - being hrtimers) - but both
the tools can deal with uneven periods just fine and the auto-freq
code can auto-balance based on this just fine too.

So you should be able to implement this within arch/sh/ with
existing perf_counter facilities and hrtimers, or you can help us
librarize it in kernel/perf_counter.c some more, to minimize
architecture code.

[ Of course, given that you are the first architecture to do this,
you would be fair to expect some unexpected details along the way
as well ;-) ]

Ingo