All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Jason Baron <jbaron@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Peter Zijlstra <peterz@infradead.org>,
	jiayingz@google.com, mbligh@google.com, roland@redhat.com,
	"Frank Ch. Eigler" <fche@redhat.com>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH 0/3] tracepoints: delay argument evaluation
Date: Wed, 20 May 2009 01:52:47 +0200	[thread overview]
Message-ID: <20090519235245.GD6066@nowhere> (raw)
In-Reply-To: <alpine.DEB.2.00.0905191826031.7816@gandalf.stny.rr.com>

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
> 


  reply	other threads:[~2009-05-19 23:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 21:03 [PATCH 0/3] tracepoints: delay argument evaluation Jason Baron
2009-05-19 21:03 ` [PATCH 1/3] tracepoints: add tracepoint_call() to optimize tracepoints disabled Jason Baron
2009-05-19 21:03 ` [PATCH 2/3] tracepoints: convert scheduler tracepoints to 'tracepoint_call' api Jason Baron
2009-05-19 21:03 ` [PATCH 3/3] tracepoints: convert block " Jason Baron
2009-05-19 21:17 ` [PATCH 0/3] tracepoints: delay argument evaluation Mathieu Desnoyers
2009-05-19 22:16   ` Jason Baron
2009-05-19 22:25     ` Roland McGrath
2009-05-19 22:31       ` Steven Rostedt
2009-05-19 22:36   ` Steven Rostedt
2009-05-19 23:52     ` Frederic Weisbecker [this message]
2009-05-20  0:33     ` Mathieu Desnoyers
2009-05-20  0:42       ` Steven Rostedt
2009-05-20  7:01       ` Roland McGrath
2009-05-20  7:12 ` Peter Zijlstra
     [not found]   ` <20090520072750.DA9A0FC38D@magilla.sf.frob.com>
2009-05-20  7:38     ` Peter Zijlstra
2009-05-20  9:18       ` Roland McGrath
2009-05-20  7:33 ` Ingo Molnar
2009-05-20 15:42   ` Jason Baron
2009-05-21  1:49     ` Jiaying Zhang
2009-05-21  1:59       ` Li Zefan
2009-05-21  2:15         ` Jiaying Zhang
2009-05-21  2:41           ` Li Zefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090519235245.GD6066@nowhere \
    --to=fweisbec@gmail.com \
    --cc=fche@redhat.com \
    --cc=hch@infradead.org \
    --cc=jbaron@redhat.com \
    --cc=jiayingz@google.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mbligh@google.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=roland@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.