[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1287524825.16971.476.camel@gandalf.stny.rr.com>
Date: Tue, 19 Oct 2010 17:47:05 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: David Daney <ddaney@...iumnetworks.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Koki Sanagi <sanagi.koki@...fujitsu.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
nhorman@...driver.com, scott.a.mcmillan@...el.com,
laijs@...fujitsu.com, "H. Peter Anvin" <hpa@...or.com>,
LKML <linux-kernel@...r.kernel.org>, eric.dumazet@...il.com,
kaneshige.kenji@...fujitsu.com, David Miller <davem@...emloft.net>,
izumi.taku@...fujitsu.com, kosaki.motohiro@...fujitsu.com,
Heiko Carstens <heiko.carstens@...ibm.com>,
"Luck, Tony" <tony.luck@...el.com>
Subject: Re: [PATCH] tracing: Cleanup the convoluted softirq tracepoints
On Tue, 2010-10-19 at 14:16 -0700, David Daney wrote:
> On 10/19/2010 12:49 PM, Thomas Gleixner wrote:
> [...]
> > So that saves _TWO_ bytes of text and replaces:
> >
> > - 1e: 83 3d 00 00 00 00 00 cmpl $0x0,0x0(%rip) # 25<test+0x25>
> > - 25: 74 4d je 74<test+0x74>
> > + 1e: e9 00 00 00 00 jmpq 23<test+0x23>
> > + 23: eb 4d jmp 72<test+0x72>
> >
> > So it trades a conditional vs. two jumps ? WTF ??
> >
> > I thought that jumplabel magic was supposed to get rid of the jump
> > over the tracing code ? In fact it adds another jump. Whatfor ?
>
> The 'asm goto' construct in GCC-4.5 is deficient in this area.
>
> GCC assumes that all exit paths from an 'asm goto' are equally likely,
> so the tracing (or dynamic printk etc.) code is assumed to be hot and is
> emitted inline. Since they are inline like this, there are all these
> jumps around them and they pollute the I-Cache.
>
Interesting. I thought the driving force for asm goto was for
tracepoints, as the documentation seems to reference them. One would
think that the default would have been to make it the unlikely case, as
it may be the only user of that code so far.
> I was looking at fixing it, but I think a true general purpose fix would
> require enhancing GCC's grammar to allow specifying of the 'likelyness'
> of each exit path from 'asm goto'.
That would be nice.
Thanks,
-- Steve
--
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