Re: [PATCH 1/2] ftrace: add notrace to ARM sched_clock routines

From: Frederic Weisbecker
Date: Fri May 01 2009 - 20:00:38 EST


On Fri, May 01, 2009 at 07:43:50PM -0400, Steven Rostedt wrote:
>
> On Sat, 2 May 2009, Frederic Weisbecker wrote:
> > > }
> > > @@ -203,7 +203,7 @@ static struct clocksource clocksource_32
> > > * Returns current time from boot in nsecs. It's OK for this to wrap
> > > * around for now, as it's just a relative time stamp.
> > > */
> > > -unsigned long long sched_clock(void)
> > > +unsigned long long notrace sched_clock(void)
> > > {
> > > unsigned long long ret;
> >
> >
> > I've looked into all of these functions and they don't seem to call
> > anything that could be traced. I could have missed something though
> > but it looks good.
>
> I think the issue is that the tracing clock will call these functions, and
> we will waste time recursing into them.


Indeed, but I wanted to ensure that none of these sched_clock() were calling
any traceable function, or it would recurse inside the function graph
low level helpers which are not protected. Hence an endless stack overrun which
ends up on an immediate reboot :)

But it looks good.

> >
> > Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
>
> Heck I'll add mine too ;-)
>
> Acked-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> -- 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/