lkml.org 
[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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


\
 
 \ /
  Last update: 2009-05-07 16:05    [W:2.396 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site