On Thu, Mar 07, 2019 at 09:00:49AM -0800, Linus Torvalds wrote:
> On Thu, Mar 7, 2019 at 8:47 AM Josh Poimboeuf <jpoim...@redhat.com> wrote:
> >
> > This "fixes" it, and also seems to help -Os make much code:
> 
> Yeah, considering that this __trace_if() macro from hell is doing an
> 'if()' on the result of that inner thing, it makes sense to *not*  use
> that "looks simpler and shorter" array sequence, but depend on the
> compiler then noticing that the conditionals are the same and joining
> the two branches together.
> 
> The compiler has to do much more work to either generate the actual
> dynamic array thing, or notice that the _index_ of the array matches
> the _conditional_ on the branch, and undo that thing.

Yeah, agreed.  Now it doesn't have to do the funky xor thing to convert
the conditional to an int.

> But that macro really is the macro from hell regardless.
> 
> Do people really use CONFIG_PROFILE_ALL_BRANCHES?

IIRC, Steven runs it once a year or so...

-- 
Josh

Reply via email to