Messages in this thread | | | Date | Thu, 7 May 2009 15:59:11 +0200 | From | Ingo Molnar <> | Subject | Re: How to use a different sched_clock() for ftrace on omap? |
| |
* Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 7 May 2009, Ingo Molnar wrote: > > > > > * Tim Bird <tim.bird@am.sony.com> 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.
that sounds good. Weak aliases are now generally supported in Linux, we excluded that one broken GCC version that messed them up.
Ingo
| |