Re: [PATCH 4/4] trace: profile all if conditionals

From: Ingo Molnar
Date: Sun Nov 23 2008 - 07:38:20 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

>
> On Fri, 21 Nov 2008, Andrew Morton wrote:
> > >
> > > +#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \
> >
> > wheee...
> >
> > Now how are you going to profile ?:, while, for(;expr;), etc? ;)

btw., there's hardware driven branch tracing and profiling in the
works too, which captures all conditionals - including loops. Stay
tuned :)

> I don't know. Give me a few months, I'll figure out a way ;-)

also loops generally have a more static (hence less interesting)
prediction pattern - while for branches we frequently have a "should
this branch be made likely/unlikely in the fastpath" question.

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