[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1010192347390.6815@localhost6.localdomain6>
Date: Tue, 19 Oct 2010 23:55:19 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Jason Baron <jbaron@...hat.com>
cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Steven Rostedt <rostedt@...dmis.org>,
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, 19 Oct 2010, Jason Baron wrote:
> On Tue, Oct 19, 2010 at 09:49:45PM +0200, Thomas Gleixner wrote:
> > > > On Tue, 19 Oct 2010, Steven Rostedt wrote:
> >
> > So it trades a conditional vs. two jumps ? WTF ??
> >
>
> right, so the 'jmpq' on boot on x86 gets patched with 5 byte no-op
> sequence. So in the disabled case we have no-op followed by a jump
> around the disabled code.
And that's supposed to be useful ? We do _NOT_ want to jump around
disabled stuff. The noped out case should fall through into the non
traced code. Otherwise that whole jumplabel thing is completely
useless.
> > I thought that jumplabel magic was supposed to get rid of the jump
> > over the tracing code ? In fact it adds another jump. Whatfor ?
> >
>
> yes, that is the plan. gcc does not yet support hot/cold labels...once
> it does the second jump will go away and the entire tracepoint code will
> be moved to a 'cold' section. It's not quite completely optimal yet, but
> we are getting there.
Then do not advertise it as the brilliant solution for all tracing
matters.
> > Now even worse, when you NOP out the jmpq then your tracepoint is
> > still not enabled. Brilliant !
> >
>
> The 'jmpq' in the enabled case is patched with a jmpq to the body of the
> tracepoint itself.
Brilliant.
> > Did you guys ever look at the assembly output of that insane shite you
> > are advertising with lengthy explanations ?
> >
> > Obviously _NOT_
> >
> > Come back when you can show me a clean imlementation of all this crap
> > which reproduces with my jumplabel enabled stock compiler. And please
> > just send me a patch w/o the blurb.
> >
> > And sane looks like:
> >
> > jmpq 2f <---- This gets noped out
> > 1:
> > mov %r12,%rdi
> > callq *(%r12)
> > [whatever cleanup it takes ]
> > leaveq
> > retq
> >
> > 2f:
> > [tracing gunk]
> > jmp 1b
> >
>
> yes, this is what the code should look like when we get support for
> hot/cold labels. I've discussed this support with gcc folk, and its the
> next step here. So yes, this is exacatly where we are headed.
So and at the same time the whole tracing crowd tells me, that this is
already a done deal. See previous advertisments from DrTracing. I'm
seriously grumpy about this especially in the context of a patch which
fixes one of the worst interfaces I've seen in years.
Thanks,
tglx
--
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