lkml.org 
[lkml]   [2009]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] tracepoints: delay argument evaluation
On Tue, May 19, 2009 at 06:36:56PM -0400, Steven Rostedt wrote:
>
> [ added Christoph ]
>
> On Tue, 19 May 2009, Mathieu Desnoyers wrote:
>
> > * Jason Baron (jbaron@redhat.com) wrote:
> > > hi,
> > >
> > > After disassembling some of the tracepoints, I've noticed that arguments that
> > > are passed as macros or that perform dereferences, evaluate prior to the
> > > tracepoint on/off check. This means that we are needlessly impacting the
> > > off case.
> > >
> > > I am proposing to fix this by adding a macro that first checks for on/off and
> > > then calls 'trace_##name', preserving type checking. Thus, callsites have to
> > > move from:
> > >
> > > trace_block_bio_complete(md->queue, bio);
> > >
> > > to:
> > >
> > > tracepoint_call(block_bio_complete, md->queue, bio);
> > >
> >
> > I knew this limitation in the first place, but decided it was not worth
> > uglifying the tracepoint call site for it.
> >
> > The expected use is to pass a pointer or a value as tracepoint argument
> > and dereference it in the callback attached to it.
> >
> > Is there any _real_ added value for going through this API change pain ?
> >
>
> I agree with Mathieu that I don't think we want to "uglify" the callers.
> But I also agree with Jason that we must not add any overhead to the "off"
> state when we can avoid it.
>
> If it comes down to the two, I would lean towards the "uglify" if it shows
> performance benefits in the "off" case.



Yeah, I agree with you, if we have no choice, the most important goal
is to drop any overhead in tracing off-case.



> Perhaps I'll try to see if I can fool CPP to getting both worlds. But this
> will be tricky :-/
>
> When are we going to get our own C pre-processor?


It starts to be really required....


> -- Steve
>



\
 
 \ /
  Last update: 2009-05-20 01:55    [W:0.113 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site