public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Roland McGrath <roland@redhat.com>
Cc: Jason Baron <jbaron@redhat.com>,
	linux-kernel@vger.kernel.org, fweisbec@gmail.com, mingo@elte.hu,
	laijs@cn.fujitsu.com, rostedt@goodmis.org,
	mathieu.desnoyers@polymtl.ca, jiayingz@google.com,
	mbligh@google.com, fche@redhat.com
Subject: Re: [PATCH 0/3] tracepoints: delay argument evaluation
Date: Wed, 20 May 2009 09:38:47 +0200	[thread overview]
Message-ID: <1242805127.26820.532.camel@twins> (raw)
In-Reply-To: <20090520072750.DA9A0FC38D@magilla.sf.frob.com>

On Wed, 2009-05-20 at 00:27 -0700, Roland McGrath wrote:
> > Why can't 
> > 
> > trace_block_bio_complete(arg..)
> >    if (__trace_block_bio_compete.state)
> >      __trace_block_bio_complete(arg)
> > 
> > work?
> > 
> > Surely its possible to wrap the whole stuff in yet another macro layer
> > that will do the conditional before evaluating the arguments?
> 
> That is exactly what Jason has implemented.  
> He called the new macro layer tracepoint_call.
> 
> You can't use a macro to generate a new macro definition, so it's not
> possible with cpp alone to have the new macro layer be one that defines a
> separate trace_foobar() macro for each defined tracepoint.

Right, just realized that.

But I think we should be asking GCC to get fixed. Since inline functions
don't act like a compiler barrier anyway, they might as well not force
argument evaluation either.

  parent reply	other threads:[~2009-05-20  7:39 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
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 [this message]
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=1242805127.26820.532.camel@twins \
    --to=peterz@infradead.org \
    --cc=fche@redhat.com \
    --cc=fweisbec@gmail.com \
    --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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox