public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, Li Zefan <lizf@cn.fujitsu.com>,
	William Cohen <wcohen@redhat.com>,
	"Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>,
	"Theodore Ts'o" <tytso@mit.edu>, Jason Baron <jbaron@redhat.com>,
	Mel Gorman <mel@csn.ul.ie>,
	Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Avi Kivity <avi@redhat.com>, Gleb Natapov <gleb@redhat.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	Josh Stone <jistone@redhat.com>,
	Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Zhaolei <zhaolei@cn.fujitsu.com>,
	Anton Blanchard <anton@samba.org>
Subject: Re: [RFC PATCH] ftrace trace event: introduce assignment macros
Date: Thu, 9 Dec 2010 15:00:43 -0500	[thread overview]
Message-ID: <20101209200043.GA8448@Krystal> (raw)
In-Reply-To: <20101209170027.GF1712@nowhere>

* Frederic Weisbecker (fweisbec@gmail.com) wrote:
> On Thu, Dec 09, 2010 at 11:22:11AM -0500, Mathieu Desnoyers wrote:
> > This patch proposes encapsulation of the raw assignments within TP_fast_assign()
> > by introducing tp_assign() and tp_memcpy() macros. This will allow us to:
> > 
> > - generically filter from input fields,
> > - redefine the field write primitives.
> > 
> > The current macros map directly to the old code. I changed the documentation in
> > tracepoint.txt to reflect these new primitives, but all TRACE_EVENT() users
> > should gradually update their code to use these macro wrappers rather than raw
> > "=" assignments or mempcy() calls.
> > 
[...]
> > ---
> >  include/linux/tracepoint.h |   12 ++++++------
> >  include/trace/ftrace.h     |    6 ++++++
> >  2 files changed, 12 insertions(+), 6 deletions(-)
> > 
> > Index: linux-2.6-lttng.git/include/trace/ftrace.h
> > ===================================================================
> > --- linux-2.6-lttng.git.orig/include/trace/ftrace.h
> > +++ linux-2.6-lttng.git/include/trace/ftrace.h
> > @@ -1,4 +1,10 @@
> >  /*
> > + * Macros mapping tp_assign() and tp_memcpy() to "=" and memcpy.
> > + */
> > +#define tp_assign(dest, src)		__entry->dest = src
> > +#define tp_memcpy(dest, src, len)	memcpy(__entry->dest, src, len)
> 
> Looks good.

Great! Can I resend it without "RFC" with your Acked-by ?

If there is wide-spread agreement on this change, I might soon start rolling out
patches that migrate TRACE_EVENT users to these new primitives.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2010-12-09 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 16:22 [RFC PATCH] ftrace trace event: introduce assignment macros Mathieu Desnoyers
2010-12-09 17:00 ` Frederic Weisbecker
2010-12-09 20:00   ` Mathieu Desnoyers [this message]
2010-12-09 21:50   ` Mathieu Desnoyers

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=20101209200043.GA8448@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=anton@samba.org \
    --cc=arjan@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=eduard.munteanu@linux360.ro \
    --cc=fweisbec@gmail.com \
    --cc=gleb@redhat.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=jbaron@redhat.com \
    --cc=jistone@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=martin.petersen@oracle.com \
    --cc=mel@csn.ul.ie \
    --cc=mhiramat@redhat.com \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=nhorman@tuxdriver.com \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=tokunaga.keiich@jp.fujitsu.com \
    --cc=tytso@mit.edu \
    --cc=wcohen@redhat.com \
    --cc=xiaoguangrong@cn.fujitsu.com \
    --cc=zhaolei@cn.fujitsu.com \
    /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