lkml.org 
[lkml]   [2010]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2010-10-19 23:59    [W:0.099 / U:1.300 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site