Re: How to use a different sched_clock() for ftrace on omap?

From: Steven Rostedt
Date: Thu May 07 2009 - 10:00:45 EST




On Thu, 7 May 2009, Ingo Molnar wrote:

>
> * Tim Bird <tim.bird@xxxxxxxxxxx> wrote:
>
> > Hi all,
> >
> > I've worked up a replacement sched_clock for ftrace on my omap
> > platform. The current sched_clock, based on the 32K timer, has low
> > resolution and doesn't provide very useful results.
>
> hm, why dont you replace the real sched_clock() with it? High
> resolution sched_clock() gives (much!) better scheduling, better
> fairness, etc.

Probably because it is board specific, that he can not replace it. But I
think something like Ryan's idea would be good. Instead of aliasing, just
make another weak symbol.


unsigned long long __attribute__((weak)) board_sched_clock(void)
{
[ original sched_clock code ]
}

unsigned long long sched_clock(void)
{
return board_sched_clock();
}



Then Tim could define a "board_sched_clock" that would be used when that
board is active.

-- Steve

--
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/