From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754700Ab0JSWOs (ORCPT ); Tue, 19 Oct 2010 18:14:48 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:60051 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753231Ab0JSWOr (ORCPT ); Tue, 19 Oct 2010 18:14:47 -0400 X-Authority-Analysis: v=1.1 cv=kXGwZUU/u1JTMRv8Axk4W0omja+vfTT+sGlOkodD8F8= c=1 sm=0 a=wGm5nfgfXM4A:10 a=Q9fys5e9bTEA:10 a=OPBmh+XkhLl+Enan7BmTLg==:17 a=mDV3o1hIAAAA:8 a=VwQbUJbxAAAA:8 a=8ccHUl6JdowTl4fXnn4A:9 a=7pPDcldb2C8H-0SubIoA:7 a=iysXg2OmJcA2mfS16mYoFv_0XjAA:4 a=PUjeQqilurYA:10 a=U62fhAwekXMA:10 a=OPBmh+XkhLl+Enan7BmTLg==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.242.120.143 Subject: Re: [PATCH] tracing: Cleanup the convoluted softirq tracepoints From: Steven Rostedt To: Thomas Gleixner Cc: Mathieu Desnoyers , Koki Sanagi , Peter Zijlstra , Ingo Molnar , Frederic Weisbecker , nhorman@tuxdriver.com, scott.a.mcmillan@intel.com, laijs@cn.fujitsu.com, "H. Peter Anvin" , LKML , eric.dumazet@gmail.com, kaneshige.kenji@jp.fujitsu.com, David Miller , izumi.taku@jp.fujitsu.com, kosaki.motohiro@jp.fujitsu.com, Heiko Carstens , "Luck, Tony" In-Reply-To: References: <20100908112529.GA25931@elte.hu> <1287395077.29097.1543.camel@twins> <1287398936.29097.1548.camel@twins> <4CBD79CF.2060706@jp.fujitsu.com> <20101019132236.GA19197@Krystal> <1287496495.16971.372.camel@gandalf.stny.rr.com> <20101019142820.GA14520@Krystal> <1287521757.16971.397.camel@gandalf.stny.rr.com> Content-Type: text/plain; charset="ISO-8859-15" Date: Tue, 19 Oct 2010 18:14:44 -0400 Message-ID: <1287526484.16971.511.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2010-10-19 at 23:45 +0200, Thomas Gleixner wrote: > On Tue, 19 Oct 2010, Steven Rostedt wrote: > > On Tue, 2010-10-19 at 21:49 +0200, Thomas Gleixner wrote: > > > > Because you do the h - softvec in the tracepoint parameter? I got a > > different result: > > I guess some serious whacking is due. > > The compiler adds two jumps when the parameter changes due to > (h -softvec) instead of (h, softvec) ???? > > Dude, you can't be serious. > > If you would have asked about the compiler version I'm using and told > me about the compiler version you are using, then I could take that > answer somehow serious. Heh, gcc has always been of a black magic for what it decided. But, anyway, I'm using a self built version (vanilla from gcc.gnu.org) of 4.5.1. What are you using? > > It still would miss the "Uhhhh, your compiler creates crap code" > alert, because that double jump is seriously broken and braindead. > > And I tell you more about this. You are going to piss off a lot of > users of distro compilers because they will set CC_HAVE_ASM_GOTO > happily and create the code I posted. Which will break the tracer no > matter what. > > So you tracer maniacs happily played with some experimental compiler > stuff w/o even testing your crap against something which ships with > distros or is the reference 4.5 compiler on kernel.org ? > > I prefer you sending a patch to disable this, until it's sorted out, > unless you want me to add some really outrageous changelog to the > patch I'm going to put into tip tomorrow night, ok ? Then lets just compare the crap versions you posted. > - 1e: 83 3d 00 00 00 00 00 cmpl $0x0,0x0(%rip) # 25 > - 25: 74 4d je 74 > + 1e: e9 00 00 00 00 jmpq 23 > + 23: eb 4d jmp 72 Yes, gcc replaced a cmp and conditional jump with two unconditional jumps. One of these jumps on boot up will be converted to a nop. Thus the jump label code just converted a compare and conditional jump with a nop and a non conditional jump. This still sounds like a win to me, although we can do better. I guess those poor sobs using a distro kernel compiled with a distro gcc that has CC_HAVE_ASM_GOTO enabled will still be doing better than if it was doing the if (enable) code. -- Steve