Re: [RFC][PATCH 3/2] x86/jump labels: Count and display the shortjumps used

From: Andy Lutomirski
Date: Fri Aug 09 2013 - 20:14:56 EST

On 08/07/2013 02:56 PM, Linus Torvalds wrote:
> Both of the biased cases *might* also want things like "save register
> state in the unlikely path so that the *likely* path doesn't have to".
> Think things like "it's a leaf function, and the likely path doesn't
> need any temporaries, but the unlikely path ends up doing function
> calls and needs a stack frame". If the compiler can make likely path
> avoid the stack frame generation and be straight-line, that would be
> really nice.

This inspired me to see what happens when you call an
__attribute__((noreturn)) function. The results are sad:

I think the explanations for why that bug is WONTFIX are bogus. And
unless gcc fixes that, trying to get efficient code that intentionally
jumps and never returns seems hard (at least without sticking the
call/jump into inline assembly).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at