[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <520585DF.6010002@mit.edu>
Date: Fri, 09 Aug 2013 17:14:23 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Jason Baron <jbaron@...mai.com>,
Steven Rostedt <rostedt@...dmis.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC][PATCH 3/2] x86/jump labels: Count and display the short
jumps used
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:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10837
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).
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists